/* Shared responsive layer: phone, tablet, and desktop widths. */

html {
    -webkit-text-size-adjust: 100%;
}

img,
video,
canvas {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

/* ===== Dashboard shell ===== */
#cryptoon-layout:not(.plans-shell) {
    max-width: 100%;
}

#cryptoon-layout:not(.plans-shell) .main {
    min-width: 0;
    max-width: 100%;
}

#cryptoon-layout:not(.plans-shell) .container,
#cryptoon-layout:not(.plans-shell) .container-fluid,
#cryptoon-layout:not(.plans-shell) .container-xxl {
    max-width: 100%;
}

#cryptoon-layout:not(.plans-shell) .card,
#cryptoon-layout:not(.plans-shell) .modal-content,
#cryptoon-layout:not(.plans-shell) .table-responsive,
#cryptoon-layout:not(.plans-shell) .dataTables_wrapper {
    max-width: 100%;
}

#cryptoon-layout:not(.plans-shell) .dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#cryptoon-layout:not(.plans-shell) table.dataTable {
    width: 100% !important;
}

#cryptoon-layout:not(.plans-shell) .select2-container {
    max-width: 100% !important;
}

#cryptoon-layout:not(.plans-shell) .seat-layout,
#cryptoon-layout:not(.plans-shell) .ss-floor,
#cryptoon-layout:not(.plans-shell) .seat-grid,
#cryptoon-layout:not(.plans-shell) .chair-container {
    max-width: 100%;
    overflow-x: auto;
}

.nav-backdrop {
    display: none;
}

@media (max-width: 1279.98px) {
    #cryptoon-layout:not(.plans-shell) {
        display: block !important;
    }

    #cryptoon-layout:not(.plans-shell) .sidebar {
        position: fixed !important;
        top: 0;
        left: 0 !important;
        bottom: 0;
        width: min(300px, 86vw) !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 1050 !important;
        border-radius: 0 !important;
    }

    #cryptoon-layout:not(.plans-shell) .sidebar.open {
        transform: translateX(0);
        left: 0 !important;
    }

    #cryptoon-layout:not(.plans-shell) .main {
        width: 100% !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.nav-open .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(3, 16, 12, 0.48);
        z-index: 1040;
    }

    #cryptoon-layout:not(.plans-shell) .menu-toggle {
        position: static !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin: 0 8px 0 0;
        padding: 0;
        border: 1px solid #e3ebe6 !important;
        border-radius: 12px;
        background: #fff !important;
        color: #073226;
        order: 0;
        font-size: 0;
    }

    #cryptoon-layout:not(.plans-shell) .menu-toggle::before {
        content: "";
        width: 16px;
        height: 2px;
        border-radius: 2px;
        background: #073226;
        box-shadow: 0 -5px 0 #073226, 0 5px 0 #073226;
    }

    #cryptoon-layout:not(.plans-shell) .header .navbar {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    #cryptoon-layout:not(.plans-shell) .header .navbar .container-xxl {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    #cryptoon-layout:not(.plans-shell) .header .order-0 {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        margin-bottom: 0 !important;
        order: 1;
    }

    #cryptoon-layout:not(.plans-shell) .h-right {
        margin-left: auto;
        order: 2;
    }

    #cryptoon-layout:not(.plans-shell) .sl-top-title {
        font-size: 16px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #cryptoon-layout:not(.plans-shell) .sl-top-sub {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #cryptoon-layout:not(.plans-shell) .sl-hero,
    #cryptoon-layout:not(.plans-shell) .sl-pagehead,
    #cryptoon-layout:not(.plans-shell) .sl-sub,
    #cryptoon-layout:not(.plans-shell) .sl-join {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    #cryptoon-layout:not(.plans-shell) .sl-grid-4,
    #cryptoon-layout:not(.plans-shell) .sl-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    #cryptoon-layout:not(.plans-shell) .main {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #cryptoon-layout:not(.plans-shell) .body {
        padding-top: 8px !important;
        padding-bottom: 16px !important;
    }

    #cryptoon-layout:not(.plans-shell) .sl-hero h1,
    #cryptoon-layout:not(.plans-shell) .sl-pagehead h1 {
        font-size: 22px;
    }

    #cryptoon-layout:not(.plans-shell) .sl-grid-4,
    #cryptoon-layout:not(.plans-shell) .sl-grid-3,
    #cryptoon-layout:not(.plans-shell) .sl-grid-2 {
        grid-template-columns: 1fr;
    }

    #cryptoon-layout:not(.plans-shell) .sl-actions a,
    #cryptoon-layout:not(.plans-shell) .modal .btn,
    #cryptoon-layout:not(.plans-shell) .card .btn-group {
        flex-wrap: wrap;
    }

    #cryptoon-layout:not(.plans-shell) .dataTables_wrapper .dataTables_length,
    #cryptoon-layout:not(.plans-shell) .dataTables_wrapper .dataTables_filter,
    #cryptoon-layout:not(.plans-shell) .dataTables_wrapper .dataTables_info,
    #cryptoon-layout:not(.plans-shell) .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: left !important;
        width: 100%;
        margin-bottom: 8px;
    }

    #cryptoon-layout:not(.plans-shell) .dataTables_wrapper .dataTables_filter input,
    #cryptoon-layout:not(.plans-shell) .dataTables_wrapper .dataTables_length select {
        width: 100% !important;
        margin-left: 0 !important;
    }

    #cryptoon-layout:not(.plans-shell) .modal-dialog,
    #cryptoon-layout:not(.plans-shell) .modal-lg,
    #cryptoon-layout:not(.plans-shell) .modal-xl {
        max-width: calc(100vw - 16px) !important;
        margin: 8px auto;
    }

    #cryptoon-layout:not(.plans-shell) .card-header,
    #cryptoon-layout:not(.plans-shell) .card-body,
    #cryptoon-layout:not(.plans-shell) .sl-pagehead {
        padding-left: 12px;
        padding-right: 12px;
    }

    #cryptoon-layout:not(.plans-shell) .row > [class*="col-"] {
        min-width: 0;
    }
}

/* Tablet landscape and small laptops keep two columns; phones drop to one. */
@media (min-width: 768px) and (max-width: 1279.98px) {
    #cryptoon-layout:not(.plans-shell) .sl-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop: sidebar is visible, so four-up cards get tight before 1500px. */
@media (min-width: 1280px) and (max-width: 1499.98px) {
    #cryptoon-layout:not(.plans-shell) .sl-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #cryptoon-layout:not(.plans-shell) .main {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (min-width: 1600px) {
    #cryptoon-layout:not(.plans-shell) .container-xxl {
        max-width: 1440px;
    }
}

@media (min-width: 1900px) {
    #cryptoon-layout:not(.plans-shell) .container-xxl {
        max-width: 1560px;
    }
}

/* Subscription plan cards inside the panel */
@media (max-width: 1399.98px) {
    .vp-plans .pricing-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    .vp-plans .pricing-container {
        grid-template-columns: 1fr !important;
    }

    .vp-plans .vp-hero {
        padding: 0 0 10px !important;
    }

    .vp-plans .vp-hero h1 {
        font-size: 24px;
    }

    .vp-plans .vp-back {
        position: static !important;
        margin-bottom: 12px;
    }

    .vp-plans .vp-renew-link {
        display: flex;
        justify-content: center;
        margin: 10px 0 0 !important;
    }
}

/* Standalone choose-plan page */
@media (max-width: 1100px) {
    body.plans-page .pricing-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 760px;
    }
}

@media (max-width: 700px) {
    body.plans-page .pricing-container {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    body.plans-page .plans-topbar-inner {
        padding: 10px 14px;
    }

    body.plans-page .plans-hero h1 {
        font-size: 24px;
    }
}

/* ===== Public website (phone and tablet only) ===== */
@media (max-width: 1199.98px) {
    .hero-three-wrapper .web-logo {
        width: auto;
        max-width: min(148px, 42vw) !important;
        max-height: 36px;
        object-fit: contain;
        height: auto !important;
    }

    .hero-three-wrapper .hero-content .display-3,
    .hero-three-wrapper .display-4 {
        font-size: clamp(1.7rem, 4vw, 3.25rem) !important;
        line-height: 1.15 !important;
    }

    .hero-three-wrapper .pt-120 {
        padding-top: clamp(48px, 8vw, 120px) !important;
    }

    .hero-three-wrapper .pb-120,
    .hero-three-wrapper .mb-60 {
        padding-bottom: clamp(36px, 6vw, 80px) !important;
    }

    .hero-three-wrapper .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (min-width: 1200px) {
    .hero-three-wrapper .web-logo {
        max-width: 250px !important;
        max-height: none !important;
        height: auto !important;
    }
}

@media (max-width: 991.98px) {
    .hero-three-wrapper .hero-three {
        padding-top: 92px !important;
        padding-bottom: 28px;
    }

    .hero-three-wrapper .tool-box,
    .hero-three-wrapper .d-flex.align-items-center.gap-3 {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .hero-three-wrapper .hero-content .btn,
    .hero-three-wrapper .search-tool .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-three-wrapper footer .row > [class*="col-"] {
        margin-bottom: 18px;
    }
}

/* ===== Auth ===== */
@media (max-width: 980px) {
    body.auth-login-page .auth-panel,
    body.auth-login-page .auth-card,
    body.auth-register-page .auth-panel,
    body.auth-register-page .auth-card {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 520px) {
    body.auth-login-page .auth-form,
    body.auth-login-page form,
    body.auth-register-page .auth-form,
    body.auth-register-page form {
        width: 100%;
    }

    body.auth-login-page .btn,
    body.auth-register-page .btn {
        width: 100%;
    }
}
