/**
 * Responsive Styles — _responsive.css
 * All @media breakpoints consolidated from page-specific files.
 * IMPORTANT: Must be loaded AFTER the page-specific CSS file.
 * Load order: styles.css → styles/_page.css → styles/_responsive.css
 */


/* === @media (min-width: 576px) — from _shop.css === */
@media (min-width: 576px) {
    .shop-products-container.shop-view-card {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* === @media (min-width: 768px) — from _component-overrides.css === */
@media (min-width: 768px) {
    .local-edwiserstore-shop-page .shop-products-container.shop-view-card {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* === @media (min-width: 992px) — from _shop.css === */
@media (min-width: 992px) {
    .shop-products-container.shop-view-card {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* === @media (min-width: 1200px) — from _shop.css === */
@media (min-width: 1200px) {
    .shop-products-container.shop-view-card {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* === @media (min-width: 1240px) — from _component-overrides.css === */
@media (min-width: 1240px) {
    .local-edwiserstore-shop-page .shop-products-container.shop-view-card {
        grid-template-columns: repeat(4, 1fr);
    }

}


/* === @media (max-width: 1024px) — from _cart.css === */
@media (max-width: 1024px) {
    .cart-page-container {
        flex-direction: column;
    }

    .cart-order-summary-section {
        width: 100%;
    }

    .order-summary-card {
        position: static;
    }
}

/* --- continued from _checkout.css --- */
@media (max-width: 1024px) {
    .checkout-page-container {
        flex-direction: column;
    }

    .checkout-order-section {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

/* --- continued from _product-view.css --- */
@media (max-width: 1024px) {
    .product-view-top-wrapper {
        flex-direction: column;
    }

    .product-view-sidebar-container {
        width: 100%;
    }

    .product-view-header-container {
        width: 100%;
    }

    .product-view-reviews-summary {
        flex-direction: column;
        gap: 24px;
    }
}


/* === @media (max-width: 768px) — from _admin-coupons.css === */
@media (max-width: 768px) {
    #page-local-edwiserstore-orders .modal-body .order-details-section:first-child .order-details-summary {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #page-local-edwiserstore-orders .modal-body .order-details-section:first-child .order-details-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #page-local-edwiserstore-orders .modal-body .order-details-section:first-child .order-details-row:first-child>* {
        padding-bottom: 8px;
        border-bottom: 1px solid var(--edw-border-card);
        margin-bottom: 8px;
    }

    #page-local-edwiserstore-orders .modal-body .order-details-section:first-child .order-details-row>* {
        padding: 4px 0;
        text-align: left !important;
    }

    /* Responsive adjustments for Subscription Section */
    #page-local-edwiserstore-orders .modal-body .order-details-section:has(.order-details-summary):not(:first-child) .order-details-summary {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #page-local-edwiserstore-orders .modal-body .order-details-section:has(.order-details-summary):not(:first-child) .order-details-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #page-local-edwiserstore-orders .modal-body .order-details-section:has(.order-details-summary):not(:first-child) .order-details-row:first-child>* {
        padding-bottom: 8px;
        border-bottom: 1px solid var(--edw-border-card);
        margin-bottom: 8px;
    }

    #page-local-edwiserstore-orders .modal-body .order-details-section:has(.order-details-summary):not(:first-child) .order-details-row>* {
        padding: 4px 0;
        text-align: left !important;
    }
}

/* --- continued from _cart.css --- */
@media (max-width: 768px) {
    .local-edwiserstore-cart-page {
        padding: 16px;
    }

    .cart-item-card {
        flex-direction: column;
        padding: 16px;
    }

    .cart-item-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .cart-header-bottom {
        flex-wrap: wrap;
    }

    .cart-title {
        font-size: 24px;
    }

    .cart-empty-title {
        font-size: 24px;
    }

    .cart-empty-illustration {
        margin-bottom: 24px;
    }

    .empty-cart-image {
        max-width: 300px;
    }
}

/* --- continued from _checkout.css --- */
@media (max-width: 768px) {

    .checkout-form .form-row-name-fields,
    .checkout-form .form-row-phone,
    .checkout-form .form-row-city-postcode {
        flex-direction: column;
        gap: 20px;
    }

    .checkout-form .form-row-name-fields .form-group-half,
    .checkout-form .form-row-phone .form-group-half,
    .checkout-form .form-row-city-postcode .form-group-half {
        flex: none;
        width: 100%;
    }
}

/* --- continued from _checkout.css --- */
@media (max-width: 768px) {
    .stripe-card-details-row {
        flex-direction: column;
        gap: 20px;
    }

    .stripe-cvc-group {
        flex: 1;
        width: 100%;
    }
}

/* --- continued from _checkout.css --- */
@media (max-width: 768px) {
    .local-edwiserstore-checkout-page {
        padding: 16px;
    }

    .checkout-page-container {
        padding: 16px;
    }

    .checkout-billing-section {
        padding: 24px;
    }

    .checkout-title {
        font-size: 24px;
    }

    /* Stripe payment form responsive styles handled by .stripe-card-details-row */
}

/* --- continued from _component-overrides.css --- */
@media (max-width: 768px) {
    #page-local-edwiserstore-thankyou .modal-sidebar.modal-dialog {
        width: 100% !important;
        max-width: 95vw !important;
        margin: 0 !important;
    }

    #page-local-edwiserstore-thankyou .modal-body .order-details-label {
        font-size: 14px !important;
    }

    .thankyou-container {
        margin: 0;
    }

    .thankyou-order-details {
        overflow-x: scroll;
    }

    .thankyou-order-table {
        width: 100%;
        table-layout: auto;
    }

    .thankyou-order-table thead th,
    .thankyou-order-table tbody td {
        padding: 12px 8px;
        font-size: 14px;
    }

    #page-local-edwiserstore-thankyou .modal-body {
        padding: 16px !important;
    }

    .order-details-summary {
        padding: 16px;
        grid-template-columns: 1fr 1fr;
    }

    .order-details-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 12px;
        padding: 0;
        border: none;
    }

    .order-details-label,
    .order-details-value {
        padding: 0;
        font-size: 14px;
    }

}

/* --- continued from _component-overrides.css --- */
@media (max-width: 768px) {
    .local-edwiserstore-content-card {
        padding: 24px;
    }

    .local-edwiserstore-dashboard {
        padding: 0;
    }

    .local-edwiserstore-dashboard-layout .dashboard-kpis {
        flex-wrap: wrap;
        gap: 16px;
    }

    .dashboard-kpis .col-md-4 {
        padding: 0;
    }

    .local-edwiserstore-dashboard-layout .local-edwiserstore-sidebar-wrapper {
        position: fixed;
        left: 0;
        height: 100%;
    }

    .local-edwiserstore-dashboard-layout .local-edwiserstore-content-wrapper {
        margin-left: 70px;
    }

    .local-edwiserstore-dashboard-layout:not(.sidebar-collapsed) .local-edwiserstore-content-wrapper {
        max-width: 100%;
    }

}

/* --- continued from _dashboard-kpi.css --- */
@media (max-width: 768px) {
    .local-edwiserstore-dashboard {
        padding: 15px;
    }

    .dashboard-kpi-value {
        font-size: 24px;
    }

    .dashboard-section-header {
        padding: 16px;
    }

    .dashboard-section-content {
        padding: 16px;
    }

    .dashboard-products-table {
        font-size: 12px;
    }

    .dashboard-products-table thead th,
    .dashboard-products-table tbody td {
        padding: 10px;
    }
}

/* --- continued from _myorders.css --- */
@media (max-width: 768px) {
    .local-edwiserstore-myorders-page {
        padding: 15px;
    }

    .myorders-page-title {
        font-size: 24px;
    }

    .myorders-search-input-wrapper {
        max-width: 100%;
    }

    .myorders-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .myorders-table {
        min-width: 600px;
    }

    .myorders-table thead th,
    .myorders-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .myorders-order-link,
    .myorders-invoice-link {
        font-size: 13px;
        display: block;
        margin-bottom: 4px;
    }

    .myorders-pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}


/* === @media (min-width: 768px) and (max-width: 1024px) — from _myorders.css === */
@media (min-width: 768px) and (max-width: 1024px) {
    .local-edwiserstore-myorders-page {
        padding: 20px;
    }

    .myorders-table thead th,
    .myorders-table tbody td {
        padding: 12px 14px;
    }
}


/* === @media (max-width: 768px) — from _mysubscriptions.css === */
@media (max-width: 768px) {
    .mysubscriptions-table-wrapper {
        overflow-x: auto;
    }

    .mysubscriptions-table {
        min-width: 800px;
    }

    .mysubscriptions-search-input-wrapper {
        max-width: 100%;
    }
}

/* --- continued from _product-view.css --- */
@media (max-width: 768px) {
    .local-edwiserstore-product-view-page {
        padding: 16px;
    }

    .product-view-header-container {
        padding: 24px;
    }

    .product-view-title {
        font-size: 24px;
    }

    .product-view-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-view-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
    }

    .product-view-tab {
        white-space: nowrap;
        padding: 12px 16px;
    }

    .product-view-tab-content {
        padding: 16px;
    }

    .product-view-instructor-card {
        flex-direction: column;
    }

    .related-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

/* --- continued from _shop.css --- */
@media (max-width: 768px) {
    .shop-empty-state {
        padding: 40px 20px 60px;
        margin-top: 30px;
    }

    .shop-empty-state .empty-illustration {
        width: 160px;
        height: 160px;
    }

    .shop-empty-state .empty-message {
        font-size: 20px;
    }
}

/* --- continued from _shop.css --- */
@media (max-width: 768px) {
    .shop-filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-search-wrapper {
        max-width: 100%;
    }

    .shop-controls-right {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .shop-products-container.shop-view-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shop-product-list-link {
        flex-direction: column;
    }

    .shop-product-list-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .shop-product-list-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .shop-product-list-footer .shop-product-btn {
        width: 100%;
    }
}

/* --- continued from _thankyou.css --- */
@media (max-width: 768px) {
    .thankyou-container {
        padding: 30px 20px;
        margin: 20px;
    }

    .thankyou-icon {
        width: 120px;
        height: 120px;
    }

    .thankyou-success-checkmark,
    .thankyou-failed-x {
        width: 50px;
        height: 50px;
    }

    .thankyou-title {
        font-size: 24px;
    }

    .thankyou-message {
        font-size: 14px;
    }

    .thankyou-order-table {
        font-size: 13px;
    }

    .thankyou-order-table thead th,
    .thankyou-order-table tbody td {
        padding: 12px 8px;
    }

    .thankyou-actions {
        flex-direction: column;
    }

    .thankyou-3ds-banner {
        padding: 16px 20px;
        margin: 20px 0;
    }

    .thankyou-3ds-content {
        flex-direction: column;
        gap: 12px;
    }

    .thankyou-3ds-icon {
        width: 28px;
        height: 28px;
    }

    .thankyou-3ds-title {
        font-size: 16px;
    }

    .thankyou-3ds-message {
        font-size: 13px;
    }

    .thankyou-3ds-status {
        justify-content: center;
        flex-wrap: wrap;
    }

    .thankyou-btn-continue,
    .thankyou-btn-view-order,
    .thankyou-btn-retry {
        width: 100%;
        padding: 14px 24px;
    }
}


/* === @media (max-width: 576px) — from _cart.css === */
@media (max-width: 576px) {
    .cart-item-meta {
        flex-direction: column;
        gap: 8px;
    }

    .coupon-input-wrapper {
        flex-direction: column;
    }

    .coupon-apply-btn {
        width: 100%;
    }
}

/* --- continued from _mysubscriptions.css --- */
@media (max-width: 576px) {
    .local-edwiserstore-mysubscriptions-page {
        padding: 10px;
    }

    .mysubscriptions-page-title {
        font-size: 1.5rem;
    }

    .mysubscriptions-table {
        font-size: 0.875rem;
    }

    .mysubscriptions-table thead th,
    .mysubscriptions-table tbody td {
        padding: 8px;
    }
}


/* === @media (max-width: 480px) — from _myorders.css === */
@media (max-width: 480px) {
    .local-edwiserstore-myorders-page {
        padding: 10px;
    }

    .myorders-page-title {
        font-size: 20px;
    }

    .myorders-table {
        min-width: 500px;
    }

    .myorders-table thead th,
    .myorders-table tbody td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .myorders-order-link,
    .myorders-invoice-link {
        font-size: 12px;
    }

    .myorders-pagination {
        overflow-x: auto;
    }

    .myorders-pagination .pagination {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
}

