/* ============================================================
   RESPONSIVE.CSS
   Usado em: TODAS as páginas (importar por último)
   Contém: media queries para 1024px, 768px e 480px
============================================================ */

/* ── Contenção global para zoom e resoluções incomuns ───── */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    min-width: 320px;
}

main,
section,
article,
aside,
header,
footer,
.container {
    min-width: 0;
}

.container {
    width: min(100%, var(--mw, 1120px));
    padding-inline: clamp(1rem, 4vw, 4rem);
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

img,
video {
    height: auto;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
td,
th,
small,
span,
strong,
a {
    overflow-wrap: anywhere;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.btn,
button,
input,
select,
textarea {
    min-width: 0;
}

.btn {
    white-space: normal;
    text-align: center;
}

.table-wrap,
.cart-layout,
.checkout-layout,
.admin-page,
.client-page,
.support-page,
.dashboard-page {
    min-width: 0;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

.plans-grid,
.services-grid,
.games-picker-grid,
.game-plans-grid,
.admin-form-grid,
.admin-stats,
.footer-grid,
.checkout-layout,
.cart-layout,
.dashboard-grid,
.account-grid {
    min-width: 0;
}

.plans-grid > *,
.services-grid > *,
.games-picker-grid > *,
.game-plans-grid > *,
.admin-form-grid > *,
.admin-stats > *,
.footer-grid > *,
.checkout-layout > *,
.cart-layout > *,
.dashboard-grid > *,
.account-grid > * {
    min-width: 0;
}

@media (max-width: 1200px) {
    .plans-grid,
    .services-grid,
    .game-plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important;
    }

    .games-picker-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important;
    }
}

/* ── Tablet largo / desktop pequeno (até 1024px) ────── */
@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .feature-block {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .feature-block.reverse {
        direction: ltr;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .page-hero-inner {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
    .admin-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .services-grid {
        grid-template-columns: 1fr 1fr;
    } /* 3 → 2 colunas */
    .mini-stats-bar {
        gap: 2rem;
    }
    .checkout-layout,
    .cart-layout,
    .dashboard-hero,
    .dashboard-grid,
    .home-split,
    .feature-block,
    .support-grid,
    .terms-layout,
    .privacy-layout,
    .refund-layout {
        grid-template-columns: 1fr !important;
    }

    .checkout-summary,
    .cart-summary {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
    }
}

/* ── Tablet estreito (até 768px) ────────────────────── */
@media (max-width: 768px) {
    section {
        padding-block: 3rem;
    }
    .hero {
        min-height: 80vh;
        padding: 3rem 0 4rem;
    }
    .plans-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .account-grid {
        grid-template-columns: 1fr;
    }
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
    .account-head {
        flex-direction: column;
    }
    .edit-dropdown {
        width: 280px;
        right: auto;
        left: 0;
    }
    .faq-grid {
        gap: 2rem;
    }
    .hero > .container,
    .section-head,
    .games-picker-head,
    .checkout-hero,
    .admin-block-head,
    .panel-title,
    .account-head,
    .footer-bottom {
        align-items: stretch !important;
        text-align: left;
    }

    .hero-cta,
    .coming-actions,
    .admin-form-actions,
    .reply-actions,
    .checkout-coupon form,
    .checkout-coupon-applied,
    .cart-actions,
    .footer-payments {
        flex-wrap: wrap;
    }

    .hero-cta .btn,
    .coming-actions .btn,
    .reply-actions .btn,
    .checkout-coupon input,
    .checkout-coupon button {
        width: 100%;
    }

    .admin-support-shell {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    .admin-support-chat-area,
    .admin-support-chat {
        min-width: 0;
    }
}

/* ── Mobile (até 560px) ─────────────────────────────── */
@media (max-width: 560px) {
    .services-grid {
        grid-template-columns: 1fr;
    } /* 2 → 1 coluna */
    .container {
        padding-inline: 1rem;
    }

    .site-footer,
    .game-section,
    .hosting-section,
    .checkout-page,
    .cart-page,
    .client-page,
    .admin-page {
        padding-inline: 0 !important;
    }

    .admin-tabs,
    .admin-subtabs,
    .billing-switcher {
        overflow-x: auto;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Mobile pequeno (até 480px) ─────────────────────── */
@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .billing-switcher {
        gap: 0.375rem;
    }
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    .btn-lg {
        padding-inline: 1.1rem;
    }

    .support-chat {
        width: calc(100vw - 1rem) !important;
        right: 0.5rem !important;
        left: 0.5rem !important;
    }

    .support-widget {
        right: 0.75rem !important;
        bottom: 0.75rem !important;
    }
}
