@import "../../pretixbase/scss/_variables.scss";
@import "../../bootstrap/scss/_bootstrap.scss";
@import "../../fontawesome/scss/font-awesome.scss";
@import "../../pretixbase/scss/_theme.scss";
@import "../../typeahead/typeahead.scss";
@import "../../charts/morris.scss";
@import "../../cropper/cropper.scss";
@import "../../datetimepicker/_bootstrap-datetimepicker.scss";
@import "_sb-admin-2.scss";
@import "_forms.scss";
@import "_flags.scss";
@import "_orders.scss";
@import "_dashboard.scss";
@import "../../pretixbase/scss/webfont.scss";
@import "../../fileupload/jquery.fileupload.scss";
@import "../../leaflet/leaflet.scss";
@import "../../select2/select2.scss";
@import "../../select2/select2_bootstrap.scss";
@import "../../colorpicker/bootstrap-colorpicker.scss";

/* See https://github.com/pretix/pretix/pull/761 */
.bootstrap-datetimepicker-widget table td span {
    line-height: 1.8em;
}

footer {
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
}

nav.navbar {
    margin: 0;
    border: 0;
}
.navbar-brand img {
    height: 100%;
    width: auto;
    display: inline;
}

#side-menu img.fa-img {
    height: auto;
    width: 1.28571em;
}

nav.navbar .danger, nav.navbar .danger:hover, nav.navbar .danger:active {
    background: $brand-danger !important;
}

.navbar-header .navbar-events {
    color: white;
    padding-top: 6px;
    padding-bottom: 6px;
}
.nav-pills {
    margin-bottom: 10px;
}

#button-shop, #button-sudo {
    padding: 15px;
    min-height: 50px;
    border: none;
    &:hover, &:active {
        text-decoration: none;
    }
}

.product-row {
    padding: 10px 0;

    .count form {
        display: inline;
    }
    .price, .count {
        text-align: right;
    }
    .price small,
    .availability-box small {
        display: block;
        line-height: 1;
    }

    &.total {
        border-top: 1px solid $table-border-color;
    }

    dl {
        padding-left: 20px;
        margin-bottom: 0;

        dd {
            padding-left: 20px;
        }
    }

    .addon-signifier {
        display: inline-block;
        padding-left: 10px;
        font-weight: bold;
    }
}

.product-row-giftcard {
    border-radius: $border-radius-base;
    padding: 10px 1.4em;
    margin: 0 0 5px 1.4em;
    background: $panel-footer-bg;
    code {
        color: $text-color;
    }
}

h1 .btn-sm {
    margin-top: -5px;
}

.btn-toolbar {
    margin-bottom: 20px;
}
.container-fluid > .alert:first-child {
    margin-top: 20px;
}
.alert h2 {
    margin-top: 0;
}

.flipped-scroll-wrapper {
    overflow-y: auto;
}
.flipped-scroll-wrapper, .flipped-scroll-inner {
    /* This nasty hack puts the scroll bar at the top, so the user really
       notices that there is one */
    transform: rotateX(180deg);
    -ms-transform: rotateX(180deg); /* IE 9 */
    -webkit-transform: rotateX(180deg); /* Safari and Chrome */
}
@media (max-width: $screen-sm-max) {
    .navbar-nav {
        margin-left: 0;
    }
}

.organizer-tabs .tab-inner {
    padding-top: 20px;
}

p.bigger {
    font-size: 16px;
}

.helper-position-relative {
    position: relative;
}
.helper-display-block {
    display: block !important;
}
.helper-display-inline {
    display: inline !important;
}
.helper-display-inline-block {
    display: inline-block !important;
}
.helper-display-none-soft {
    display: none;
}
.helper-display-none {
    display: none !important;
}
.helper-width-auto {
    width: auto;
}
.helper-width-100 {
    width: 100%;
}
.helper-space-below {
    margin-bottom: 10px;
}
.text-h1 { font-size: $font-size-h1; }
.text-h2 { font-size: $font-size-h2; }
.text-h3 { font-size: $font-size-h3; }
.text-h4 { font-size: $font-size-h4; }
.text-h5 { font-size: $font-size-h5; }
.text-h6 { font-size: $font-size-h6; }

.section-moved {
    margin: 20px 0;
    text-align: center;

    p {
        font-size: 18px;
        margin: 20px auto;
        max-width: 800px;
    }

    .img-moved {
        height: 200px;
        width: auto;
    }
}
.empty-collection {
    margin: 20px 0;
    text-align: center;

    p {
        font-size: 24px;
    }

    .big-grey-icon {
        font-size: 200px;
        color: #ccc;
    }
}
.table .progress {
    margin-bottom: 0;
}

@for $i from 0 through 100 {
  .progress-bar-#{$i} { width: 1% * $i; }
}

.form-order-change .radio {
    display: block;
}
.form-order-change .form-group {
    margin: 0;
}

.multi-step-tutorial {
    &> li {
        margin-bottom: 15px;
    }
}

body.loading #wrapper {
    -webkit-filter: blur(2px);
    -moz-filter: blur(2px);
    -ms-filter: blur(2px);
    -o-filter: blur(2px);
    filter: blur(2px);
}

#loadingmodal, #ajaxerr {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, .7);
    opacity: 0;
    z-index: 900000;
    visibility: hidden;
    padding: 10px;

    .big-icon {
        margin-top: 50px;
        font-size: 200px;
        color: $brand-primary;
    }

    .modal-card {
        margin: 50px auto 0;
        top: 50px;
        width: 90%;
        max-width: 600px;
        background: white;
        border-radius: $border-radius-large;
        box-shadow: 0 7px 14px 0 rgba(78, 50, 92, 0.1),0 3px 6px 0 rgba(0,0,0,.07);
        padding: 20px;
        min-height: 160px;

        .modal-card-icon {
            float: left;
            width: 150px;
            text-align: center;

            .big-rotating-icon {
                font-size: 120px;
                margin: 0;
            }
        }
        .modal-card-content {
            margin-left: 160px;
            text-align: left;
            h3 {
                margin-top: 0;
            }
        }
    }
}
@media (max-width: 700px) {
    #loadingmodal, #ajaxerr {
        .modal-card {
            .modal-card-icon {
                float: none;
                width: 100%;
            }
            .modal-card-content {
                text-align: center;
                margin-left: 0;
                margin-right: 0;
                margin-top: 10px;
            }
        }
    }
}

#ajaxerr {
    background: rgba(236, 236, 236, .9);
}

.loading #loadingmodal, .ajaxerr #ajaxerr {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease-in-out;
    -moz-transition: opacity .5s ease-in-out;
    -webkit-transition: opacity .5s ease-in-out;
}

.big-rotating-icon {
    margin-top: 50px;
    -webkit-animation: fa-spin 8s infinite linear;
    animation: fa-spin 8s infinite linear;
    font-size: 200px;
    color: $brand-primary;
}

.user-admin-icon {
    width: 16px;
    height: 16px;
    margin-top: -2px;
}

.meta .user-admin-icon {
    width: 12px;
    height: 12px;
    margin-top: -2px;
}

.btn .fa {
    @extend .fa-fw;
}

.action-col-2 {
    min-width: 95px;
}

.fa-danger {
    color: $brand-danger;
}

.nearly-gone {
    overflow: visible !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.colorpicker-2x .colorpicker-saturation {
    width: 200px;
    height: 200px;
}

.colorpicker-2x .colorpicker-hue,
.colorpicker-2x .colorpicker-alpha {
    width: 30px;
    height: 200px;
}

.colorpicker-2x .colorpicker-color,
.colorpicker-2x .colorpicker-color div {
    height: 30px;
}


.dropdown-menu .form-box {
    padding: 3px 10px;
}
.event-dropdown {
    width: 251px;
}
@media (max-width: $screen-xs-max) {
    .event-dropdown {
        width: 100%;
    }
}
.event-dropdown, .mobile-event-dropdown, .select2-results {
    .event-name-full, .primary {
        display: block;
    }
    .event-daterange, .event-organizer, .secondary {
        display: block;
        font-size: $font-size-small;
        color: $text-muted;
    }
    .active .event-daterange, .active .event-organizer, .active a,
    .select2-results__option--highlighted .event-daterange,
    .select2-results__option--highlighted .secondary,
    .select2-results__option--highlighted .event-organizer {
        color: white;
    }
    .active {
        background: $brand-primary;
        color: white;
    }
    span.event-name-full, span.event-daterange, span.event-organizer, span.secondary {
        width: 100%;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
    .loading {
        padding: 10px;
        text-align: center;
        color: lightgrey;
    }
}

.sidebar-content {
    text-align: center;
    padding: 10px 0;
    font-size: 12px;

    img {
        max-width: 80%;
    }
}

.mobile-navbar-view-form {
    float: right;
    button {
        position: relative;
        margin-right: 15px;
        padding: 6px 10px;
        margin-top: 8px;
        margin-bottom: 8px;
        background-color: transparent;
        background-image: none;
        border: 1px solid transparent;
        border-radius: 4px;
    }
}
.mobile-navbar-view-link {
    padding: 6px 10px;
    color: white !important;
}

@media (min-width: $screen-md-min) {
    .row-plugins {
        display: flex;
        flex-wrap: wrap;
    }

    .row-plugins > [class*=col] {
        display: flex;
        flex-direction: column;
    }

    .row-plugins > [class*=col] > .panel {
        height: 100%
    }
}

.dl-horizontal dt  {
    white-space: normal;
}
td > .dl-horizontal {
    margin-bottom: 0;
}

.collapse-indicator {
    -webkit-transition: all 150ms ease-in 0s;
    transition: all 150ms ease-in 0s;
}

.panel-title a:not(.collapsed) .collapse-indicator {
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.panel-title a[data-toggle="collapse"], details .panel-title {
    display: flex;
    padding: 10px 15px;
    margin: -10px -15px;
    align-items: center;
    justify-content: space-between;
    outline: 0;
    text-decoration: none;
    position: relative;
    padding-left: 30px;
}
details strong.panel-title {
    display: inline-block;
}

.panel-title a[data-toggle="collapse"] .collapse-indicator,
details .panel-title .collapse-indicator {
    /* hide old collapse indicators until they are all removed from HTML */
    display: none;
}

.panel-title a[data-toggle="collapse"]::before,
details .panel-title::before {
    position: absolute;
    top: 50%;
    left: 10px;
    margin-top: -.5em;
    content: "";
    width: 1em;
    height: 1em;
    font: normal normal normal 14px/1 FontAwesome;
    display: inline-block;
    text-align: center;
    transform: rotate(-90deg);
    transition: transform 150ms ease-in 0s;
}
.panel-title a:not(.collapsed)::before,
details.details-open .panel-title::before {
    transform: rotate(0deg);
}

.panel-title a[data-toggle="collapse"]:hover {
    background-color: #eeeeee;
}

.panel-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.alert > dl:last-child,
td > p:last-child,
.panel-body > dl:last-child,
.panel-body > .table:last-child,
.panel-body > .table-responsive:last-child > .table:last-child {
    margin-bottom: 0;
}
.alert > p + p, .alert > p + ul, .alert > ul + p {
    margin-top: 5px;
}

.fa.disabled {
    color: $text-muted;
}

.event-name-col {
    width: 30%;
}

.impersonate-warning, .old-browser-warning {
    background-color: #ffe761;
    background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
    background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
    background-image: linear-gradient(135deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
    padding: 15px;
}

.old-browser-warning {
    padding: 32px;/* 30px + 2px optical compensation */
    font-size: 30px;
}

@media(min-width:768px) {
    .impersonate-warning, .old-browser-warning {
        position: inherit;
        margin: 0 0 0 250px;
        padding: 15px 47px;/* 45px + 2px optical compensation */
    }
}

.quotabox {
    display: inline-block;
    vertical-align: top;
    width: 50px;
    .progress {
        height: 7px;
        margin-bottom: 2px;
    }
    .numbers {
        font-size: 10px;
        color: $text-muted;
        display: block;
        text-align: center;
    }
    &.availability .progress-bar-success {
        background: lighten($brand-success, 20%);
    }
}
.quotabox-more {
    font-weight: bold;
    display: inline-block;
    vertical-align: top;
    line-height: 20px;
    margin-top: -6px;
    &:hover {
        text-decoration: none;
    }
}
.quick-setup-step {
    clear: both;
    .quick-icon {
        float: left;
        width: 100px;

        .fa-ticket, .fa-check-circle {
            margin-top: -20px;
        }
        .fa-wrench {
            margin-top: -30px;
        }
        .fa-money, .fa-envelope {
            margin-top: -40px;
        }
    }
    .quick-icon .fa {
        font-size: 100px;
        line-height: 170px;
        display: block;
    }
    .quick-content {
        margin-left: 160px;
        padding-top: 5px;
        overflow: hidden;
    }
}
.thank-you {
    margin-bottom: 25px;

    .fa {
        font-size: 150px;
        line-height: 170px;
        display: block;
        color: $brand-success;
    }

    h2 {
        color: $brand-success;
    }
}
@media (min-width: $screen-md-min) {
    .thank-you {
        min-height: 170px;
        width: 70%;
        margin: auto;

        & > .fa {
            float: left;
            margin-right: 30px;
            margin-left: 0;
        }

        h2 {
            padding-top: 25px;
        }

        & > * {
            margin-left: 158px;
        }
    }
}
@media (max-width: $screen-md-max) {
    .quick-setup-step {
        .quick-icon {
            display: none;
        }
        .quick-content {
            margin-left: 0;
        }
    }
}
@media (max-width: $screen-sm-max) {
    .thank-you {
        text-align: center;
    }
    h2 {
        margin-top: 0;
    }
}
.iconcol {
    width: 1.28571em;
}

ul.pagination {
    margin-bottom: 0;
}
.pagination-container {
    margin-bottom: 20px;
}

.table-payment-providers > tbody > tr > td {
    vertical-align: middle;
}


details {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}

details summary {
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}
.nojs details[open] .collapse-indicator, details.details-open .collapse-indicator {
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    transform: rotate(180deg);
}
.position-buttons {
    padding-left: 20px;
}

.pos-canceled * {
    color: $brand-danger;
    text-decoration: line-through !important;
}

h1 .label {
    display: inline-block;
}

.qr-code-overlay {
    display: none;
    position: absolute;
    padding: 30px;
    background: white;
    text-align: center;
    border-radius: $border-radius-small;
    box-shadow: 0 7px 14px 0 rgba(78, 50, 92, 0.1),0 3px 6px 0 rgba(0,0,0,.07);
}

.timeline {
    .col-date {
        position: relative;
        min-height: 1px;
        padding-left: 15px;
        width: 120px;
        float: left;
    }
    .col-event {
        position: relative;
        min-height: 1px;
        padding-right: 15px;
        margin-left: 120px;
    }
}

.plugin-category {
    clear: both;
    padding: 15px 15px;
}
.plugin-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    .plugin-container {
        flex-basis: 100%;
        flex-shrink: 0;
        border-top: 1px solid #ccc;
        padding-top: 15px;
    }
    h4 {
        margin-top: 0;
    }
    .plugin-picture {
        width: auto;
        max-width: 100%;
        height: 32px;
        object-fit: contain;
    }
    .featured-plugin {
        flex: 1;
        min-width: 28em;
        border-top: none;
        padding-top: 0;

        .panel {
            border-left: 5px solid $brand-primary;
            height: 100%;
        }

        .panel-body {
            display: flex;
            flex-direction: column;
            height: 100%;

            .plugin-text {
                flex-grow: 1;
            }
            .plugin-picture {
                height: 64px;
            }
        }
    }
}

.answer-thumb img {
    width: auto;
    height: auto;
    max-height: 100px;
    max-width: 100%;
    margin-top: 5px;
}

.pretixscan-migration {
    h2 {
        margin-top: 0;
    }
    img {
        width: 64px;
        margin-bottom: 5px;
    }
}

@media(max-width: $screen-sm-max) {
    .timeline {
        .col-date {
            width: 100%;
            float: none;
        }
        .col-event {
            margin-left: 0;
            padding-left: 15px;
        }
    }
}

.sortable-chosen {
    background-color: $table-bg-hover;
}
tbody[data-dnd-url] {
    transition: opacity 1s;
}
.sortable-sorting tbody:not(.sortable-dragarea) {
    opacity: .4;
}
tbody th {
    background: $table-bg-hover;
}
.table-th-sticky-horizontal th[scope=row] {
    position: sticky;
    left: 0;
    background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 96%, rgba(255,255,255,0) 100%);;
}
.large-link-group {
    a.list-group-item {
        &::before {
            font-family: FontAwesome;
            font-size: 30px;
            content: $fa-var-chevron-right;
            float: right;
            color: $link-color;
        }
        h4 {
            color: $link-color;
        }
        &:hover &::before {
            color: $link-hover-color;
        }
        &:hover h4 {
            color: $link-hover-color;
        }
    }
}

.nomargin-top {
    margin-top: 0;
}

.checkin-sim-result {
    text-align: center;
    padding: 20px;
    .fa {
        color: white;
        font-size: 50px;
    }
}
.checkin-sim-result-status-ok {
    background: $brand-success;
}
.checkin-sim-result-status-incomplete {
    background: $brand-primary;
}
.checkin-sim-result-status-error {
    background: $brand-danger;
}
.checkin-sim-result-status-error.checkin-sim-result-reason-already_redeemed {
    background: $brand-warning;
}

.withoutjs {
    display: none !important;
}
.nojs .requirejs {
    display: none !important;
}
.nojs .withoutjs {
    display: block !important;
}

.btn-group .btn:not(:first-child) {
    margin-left: -1px;
}

@import "../../pretixbase/scss/_rtl.scss";
@import "../../bootstrap/scss/_rtl.scss";
@import "_rtl.scss";
