/* Canlı destek açılış — PusluBet Fanatik charcoal / red */

.live-support-prechat-modal {
    --support-accent: #ff003a;
    --support-accent-dark: #cc002e;
    --support-text: #ffffff;
    --support-muted: #9aa1ab;
    --support-bg: #16181c;
    --support-panel: #1e2126;
    --support-field: #121418;
    --support-line: rgba(255, 255, 255, 0.1);

    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    background: #16181c;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.live-support-prechat-modal.is-open {
    display: block;
    opacity: 1;
}

html.live-support-prechat-open,
body.live-support-prechat-open {
    overflow: hidden !important;
    height: 100%;
    overscroll-behavior: none;
}

body.live-support-prechat-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

body.live-support-prechat-open #mobile-bottom-nav,
body.live-support-prechat-open .mobile-bottom-nav {
    display: none !important;
}

.live-support-prechat-modal__wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.live-support-prechat-modal__panel {
    position: relative;
    width: 100%;
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #16181c;
    color: var(--support-text);
    font-family: "Outfit", system-ui, sans-serif;
}

.live-support-prechat-modal__close {
    position: absolute;
    top: max(0.85rem, env(safe-area-inset-top));
    right: 0.85rem;
    z-index: 5;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 999px;
    background: #ff003a;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 0, 58, 0.28);
}

.live-support-prechat-modal__head {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: calc(3.2rem + env(safe-area-inset-top)) 1.25rem 0.35rem;
    text-align: center;
}

.live-support-prechat-modal__brand-text {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    text-transform: uppercase;
}

.live-support-prechat-modal__title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.98rem;
    font-weight: 650;
    color: #e8eaed;
}

.live-support-prechat-modal__title i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.live-support-prechat-modal__body {
    flex: 0 0 auto;
    display: block;
    width: min(100%, 440px);
    margin: 0 auto;
    box-sizing: border-box;
    padding: 1rem 1.2rem calc(1.25rem + env(safe-area-inset-bottom));
}

.live-support-prechat-modal__body form {
    display: flex;
    flex-direction: column;
}

.live-support-prechat-modal__field {
    margin-bottom: 0.85rem;
}

.live-support-prechat-modal__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #f3f4f6;
}

.live-support-prechat-modal__label .req {
    color: var(--support-accent);
}

.live-support-prechat-modal__input,
.live-support-prechat-modal__select,
.live-support-prechat-modal__submit,
.live-support-prechat-modal__close,
.live-support-prechat-modal__link,
.live-support-prechat-modal__locked {
    touch-action: manipulation;
}

.live-support-prechat-modal__input,
.live-support-prechat-modal__select,
.live-support-prechat-modal__locked {
    width: 100%;
    box-sizing: border-box;
    min-height: 2.9rem;
    border-radius: 0.75rem;
    border: 1px solid var(--support-line);
    background: var(--support-field);
    padding: 0.72rem 0.9rem;
    font-size: 1rem;
    color: #fff;
}

.live-support-prechat-modal__select {
    color-scheme: dark;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9aa1ab 50%), linear-gradient(135deg, #9aa1ab 50%, transparent 50%);
    background-position: calc(100% - 1.15rem) 1.2rem, calc(100% - 0.82rem) 1.2rem;
    background-size: 0.34rem 0.34rem, 0.34rem 0.34rem;
    background-repeat: no-repeat;
    background-color: var(--support-field);
}

.live-support-prechat-modal__input::placeholder {
    color: #6b7280;
}

.live-support-prechat-modal__input:focus,
.live-support-prechat-modal__select:focus {
    outline: none;
    border-color: rgba(255, 0, 58, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 0, 58, 0.14);
}

.live-support-prechat-modal__input.is-invalid,
.live-support-prechat-modal__select.is-invalid {
    border-color: rgba(255, 0, 58, 0.75);
}

.live-support-prechat-modal__locked {
    font-weight: 650;
    color: #e5e7eb;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.14);
}

.live-support-prechat-modal__locked-note {
    margin: -0.2rem 0 0.85rem;
    font-size: 0.78rem;
    color: var(--support-muted);
}

.live-support-prechat-modal__link {
    color: #ff003a;
    font-weight: 700;
    text-decoration: none;
}

.live-support-prechat-modal__link:hover {
    color: #fff;
}

.live-support-prechat-modal__error {
    display: none;
    margin: 0 0 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.7rem;
    font-size: 0.78rem;
    color: #fecaca;
    background: rgba(255, 0, 58, 0.1);
    border: 1px solid rgba(255, 0, 58, 0.28);
}

.live-support-prechat-modal__error.is-visible {
    display: block;
}

.live-support-prechat-modal__submit {
    width: 100%;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0 !important;
    border-radius: 0.85rem;
    padding: 0.95rem 1rem;
    font-size: 1.02rem;
    line-height: 1.2;
    background: #ff003a !important;
    box-shadow: none !important;
    cursor: pointer;
}

.live-support-prechat-modal__submit,
.live-support-prechat-modal__submit .live-support-prechat-modal__submit-text {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    font-family: "Outfit", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.live-support-prechat-modal__submit:hover {
    background: #e60034 !important;
}

.live-support-prechat-modal__submit:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed;
}

.live-support-prechat-modal__submit-spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: live-support-spin .7s linear infinite;
}

@keyframes live-support-spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    .live-support-prechat-modal__wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
        background: rgba(0, 0, 0, 0.55);
        overflow: auto;
    }
    .live-support-prechat-modal__panel {
        width: min(420px, 100%);
        min-height: auto;
        border-radius: 1.1rem;
        overflow: hidden;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
        background: #1e2126;
        border: 1px solid rgba(255,255,255,0.06);
    }
    .live-support-prechat-modal__head {
        padding-top: 2.6rem;
    }
}

@media (max-height: 700px) {
    .live-support-prechat-modal__head {
        padding-top: calc(2.6rem + env(safe-area-inset-top));
        gap: 0.3rem;
    }
    .live-support-prechat-modal__brand-text {
        font-size: 1.15rem;
    }
    .live-support-prechat-modal__field {
        margin-bottom: 0.6rem;
    }
    .live-support-prechat-modal__input,
    .live-support-prechat-modal__select,
    .live-support-prechat-modal__locked {
        min-height: 2.55rem;
        padding: 0.55rem 0.8rem;
    }
}
