/* ==========================================================================
   Pop-up « Connectez-vous pour contacter les vendeurs » (partials/contact-gate.blade.php)
   Ouverte par js/components/contact-gate.js quand un visiteur a atteint sa limite de contacts.
   Même allure que la pop-up « Appeler le vendeur » (car-call-popup.css).
   ========================================================================== */
html.tv-gate-open {
    overflow: hidden;
}

/* Le thème fixe couleur et taille sur tous les éléments (* { color; font-size }) : ici tout hérite */
.tv-gate * {
    color: inherit;
    font-size: inherit;
}

.tv-gate {
    width: min(400px, calc(100% - 32px));
    max-width: none;
    margin: auto; /* le thème met * { margin: 0 } : on rétablit le centrage du <dialog> */
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
    color: #334155;
    font-family: inherit;
}

.tv-gate[open] {
    animation: tv-gate-in .2s ease-out;
}

.tv-gate::backdrop {
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(3px);
}

@keyframes tv-gate-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.tv-gate__box {
    position: relative;
    padding: 32px 24px 24px;
    text-align: center;
}

.tv-gate__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    cursor: pointer;
    transition: background-color .2s ease;
}

.tv-gate__close:hover {
    background: #e2e8f0;
}

.tv-gate__close svg {
    width: 18px;
    height: 18px;
}

.tv-gate__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: rgba(var(--primary-color-rgb, 152, 188, 42), .14);
    color: var(--primary-color, #98bc2a);
}

.tv-gate__icon svg {
    width: 28px;
    height: 28px;
}

.tv-gate .tv-gate__title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.tv-gate .tv-gate__text {
    margin: 0 0 22px;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.55;
}

.tv-gate__actions {
    display: grid;
    gap: 10px;
}

.tv-gate .tv-gate__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, filter .2s ease;
}

.tv-gate__btn svg {
    width: 18px;
    height: 18px;
}

.tv-gate .tv-gate__btn--primary {
    background: var(--primary-color, #98bc2a);
    color: #fff;
}

.tv-gate .tv-gate__btn--primary:hover {
    filter: brightness(.92);
    color: #fff;
}

.tv-gate .tv-gate__btn--outline {
    border-color: #e2e8f0;
    background: #fff;
    color: #0f172a;
}

.tv-gate .tv-gate__btn--outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.tv-gate .tv-gate__note {
    margin: 16px 0 0;
    color: #94a3b8;
    font-size: .8rem;
    line-height: 1.4;
}

/* Variante « Accès suspendu » (rythme de clics anormal, 30 min) */
.tv-gate--blocked .tv-gate__icon {
    background: rgba(220, 38, 38, .1);
    color: #dc2626;
}

.tv-gate--blocked .tv-gate__wait {
    display: block;
    margin-top: 10px;
    color: #b45309;
    font-weight: 600;
}

.tv-gate--blocked .tv-gate__wait:empty {
    display: none;
}
