/* Onlayn növbə pop-up forması */

.qm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(18, 32, 44, .45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}

.qm-overlay[hidden] {
    display: none;
}

body.qm-open {
    overflow: hidden;
}

.qm-dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(15, 30, 45, .16);
    font-size: 14px;
    line-height: 1.5;
    color: #22282e;
}

/* Başlıq */
.qm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #edf0f2;
}

.qm-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #22282e;
}

.qm-close {
    background: none;
    border: 0;
    padding: 0;
    width: 26px;
    height: 26px;
    font-size: 22px;
    line-height: 1;
    color: #b6bdc4;
    cursor: pointer;
}

.qm-close:hover {
    color: #22282e;
}

.qm-body {
    padding: 22px 24px 24px;
}

/* Bildirişlər */
.qm-alert {
    margin-bottom: 18px;
    padding: 10px 13px;
    border-radius: 5px;
    font-size: 13px;
}

.qm-alert[hidden] {
    display: none;
}

.qm-alert-error {
    background: #fdf2f0;
    color: #a33c2b;
}

.qm-alert-success {
    background: #eff7f2;
    color: #1f7a49;
}

/* Sahələr */
.qm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.qm-field-wide {
    grid-column: 1 / -1;
}

.qm-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #5c666f;
}

/* Məcburi xana işarəsi */
.qm-req {
    margin-left: 3px;
    color: #d0492f;
    font-style: normal;
}

.qm-field input,
.qm-select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dde2e6;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #22282e;
    box-sizing: border-box;
}

.qm-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dde2e6;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    color: #22282e;
    box-sizing: border-box;
    resize: vertical;
    min-height: 76px;
}

.qm-field textarea:focus {
    outline: none;
    border-color: #0693C4;
}

.qm-field.has-error textarea {
    border-color: #d0492f;
}

.qm-note-field[hidden] {
    display: none;
}

.qm-field input::placeholder {
    color: #c3c9cf;
}

.qm-field input:focus,
.qm-select:focus {
    outline: none;
    border-color: #0693C4;
}

.qm-select {
    padding-right: 34px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23888f96' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}

.qm-select:disabled {
    background-color: #f7f8f9;
    color: #9aa2a9;
    cursor: default;
}

.qm-field.has-error input,
.qm-field.has-error .qm-select {
    border-color: #d0492f;
}

.qm-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #c0442c;
}

.qm-error:empty {
    display: none;
}

/* Razılıq */
.qm-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 20px 0 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
    color: #6d757c;
    cursor: pointer;
}

.qm-consent input {
    margin: 3px 0 0;
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    accent-color: #0693C4;
}

/* Alt hissə */
.qm-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #edf0f2;
}

.qm-foot-center {
    justify-content: center;
}

.qm-hint {
    font-size: 12px;
    color: #9aa2a9;
}

.qm-step-otp .qm-foot,
.qm-step-reschedule .qm-foot {
    justify-content: flex-end;
}

.qm-btn {
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.qm-btn[disabled] {
    opacity: .55;
    cursor: default;
}

.qm-btn[hidden] {
    display: none;
}

.qm-btn-primary {
    background: #0693C4;
    color: #fff;
}

.qm-btn-primary:hover:not([disabled]) {
    background: #057ba5;
}

.qm-btn-ghost {
    background: #f2f4f6;
    color: #5c666f;
}

.qm-btn-ghost:hover:not([disabled]) {
    background: #e8ebee;
}

.qm-link {
    background: none;
    border: 0;
    padding: 0;
    color: #0693C4;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.qm-link:hover:not([disabled]) {
    text-decoration: underline;
}

.qm-link[disabled] {
    color: #b6bdc4;
    cursor: default;
}

/* OTP addımı */
.qm-otp-info {
    margin: 0 0 18px;
    font-size: 14px;
    color: #4d565e;
}

.qm-field-code {
    max-width: 200px;
}

.qm-field-code input {
    height: 48px;
    letter-spacing: 8px;
    text-indent: 8px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.qm-resend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 12px;
    color: #9aa2a9;
}

/* Vaxt dəyişikliyi */
.qm-notice {
    padding: 12px 15px;
    background: #f1f8fb;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.55;
    color: #175f7a;
}

.qm-lead {
    margin: 18px 0 14px;
    font-size: 13px;
    color: #5c666f;
}

.qm-reschedule-picker[hidden] {
    display: none;
}

/* Nəticə */
.qm-step-done {
    text-align: center;
    padding: 6px 0 0;
}

.qm-done-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #eff7f2;
    color: #2e9e5b;
    font-size: 20px;
    line-height: 44px;
}

.qm-done-message {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 600;
}

.qm-ticket {
    display: inline-block;
    min-width: 190px;
    padding: 16px 26px;
    border: 1px solid #e4e8eb;
    border-radius: 6px;
}

.qm-ticket-label {
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9aa2a9;
    margin-bottom: 4px;
}

.qm-ticket-code {
    font-size: 28px;
    font-weight: 700;
    color: #0693C4;
    line-height: 1.1;
}

.qm-ticket-when {
    margin-top: 8px;
    font-size: 14px;
    color: #4d565e;
}

.qm-ticket-when span + span::before {
    content: '·';
    margin: 0 7px;
    color: #c3c9cf;
}

.qm-done-hint {
    margin: 16px 0 0;
    font-size: 12px;
    color: #9aa2a9;
}

/* Gizli bot tələsi — ekranda görünmür, ekran oxuyucular da atlayır */
.qm-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Saytdakı düymə */
/* `hidden` atributu display:block-dan güclü olsun (sınaq rejimində düymə gizlədilir) */
.queue-button[hidden] {
    display: none;
}

.queue-button {
    display: block;
    width: 100%;
    padding: 12px 10px;
    margin-bottom: 14px;
    background: #0693C4;
    color: #fff;
    border: 0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    line-height: 1.35;
}

.queue-button:hover,
.queue-button:focus {
    background: #057ba5;
    color: #fff;
    text-decoration: none;
}

.queue-button i {
    margin-right: 6px;
}

/* Planşet */
@media (max-width: 780px) {
    .qm-overlay {
        padding: 20px 12px;
    }
}

/* Mobil */
@media (max-width: 600px) {
    .qm-overlay {
        padding: 0;
        /* mobil brauzerlərin ünvan zolağını nəzərə alır */
        min-height: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .qm-dialog {
        border-radius: 0;
        min-height: 100%;
        box-shadow: none;
    }

    /* başlıq sürüşdürəndə yuxarıda qalır */
    .qm-head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
        padding: 14px 16px;
    }

    .qm-body {
        padding: 18px 16px 24px;
    }

    .qm-grid {
        grid-template-columns: 1fr;
    }

    /* iOS Safari 16px-dən kiçik sahədə avtomatik zoom edir */
    .qm-field input,
    .qm-select {
        font-size: 16px;
        height: 44px;
    }

    .qm-field textarea {
        font-size: 16px;
    }

    .qm-field-code {
        max-width: none;
    }

    .qm-field-code input {
        height: 54px;
    }

    .qm-foot {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .qm-btn {
        width: 100%;
        height: 46px;
    }

    .qm-hint {
        text-align: center;
    }

    .qm-ticket {
        display: block;
        min-width: 0;
        padding: 16px;
    }

    .qm-ticket-code {
        font-size: 26px;
    }

    .qm-consent {
        font-size: 13px;
    }
}

/* Alçaq ekranlar (mobil, üfüqi vəziyyət) */
@media (max-height: 480px) {
    .qm-overlay {
        align-items: flex-start;
        padding: 0;
    }

    .qm-dialog {
        border-radius: 0;
    }
}
