/* assets/css/responsive.css - Multi-Device Responsive System for Label Crop */

/* ==========================================================================
   Global Responsive Foundations & Defensive Layout Rules
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

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

/* Badge & Text Wrapping Safeguards */
.badge,
.brand-badge,
.trust-pill,
.badge-responsive {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
    max-width: 100%;
}

.text-break-word {
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.min-w-0 {
    min-width: 0 !important;
}

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   Ultra-Wide Desktops (1440px to 1920px+)
   ========================================================================== */
@media (min-width: 1440px) {
    .container, .container-lg, .container-xl, .container-xxl {
        max-width: 1280px;
    }
}

/* ==========================================================================
   Standard Desktops & Laptops (1200px to 1399.98px)
   ========================================================================== */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .container {
        max-width: 1140px;
    }
}

/* ==========================================================================
   Compact Desktops & Large Tablets Landscape (992px to 1199.98px)
   (Includes iPad Pro 1024px, 1080p split screen)
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .site-header .navbar-nav .nav-link {
        padding: 0.45rem 0.55rem !important;
        font-size: 0.85rem;
    }

    .site-header .navbar-brand {
        font-size: 1.15rem;
        gap: 8px;
    }

    .site-header .navbar-brand .brand-logo {
        height: 38px;
    }

    .site-header .dropdown-mega-grid {
        width: 580px;
        grid-template-columns: repeat(2, 1fr);
    }

    .channels-matrix {
        grid-template-columns: repeat(3, 1fr);
    }

    .editorial-grid {
        gap: 2rem;
    }
}

/* ==========================================================================
   Tablets & Mobile Viewports (< 992px) - Offcanvas Nav & Stacked Sections
   (Includes iPad 820px, 768px portrait)
   ========================================================================== */
@media (max-width: 991.98px) {
    .site-header {
        position: sticky;
        top: 0;
        background: #FFFFFF;
        border-bottom: 1px solid var(--header-border);
        box-shadow: var(--header-shadow);
    }

    .site-header .navbar-brand .brand-logo {
        height: 36px;
    }

    .site-header .navbar-toggler {
        background: #F8FAFC;
        border: 1px solid var(--border-color) !important;
        color: var(--charcoal-800);
    }

    .site-header .navbar-toggler i {
        color: var(--charcoal-800) !important;
    }

    .site-header .navbar-collapse {
        background: #FFFFFF;
        border-radius: var(--radius-lg);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        padding: 1.25rem;
        margin-top: 0.75rem;
        border: 1px solid var(--border-color);
        max-height: 80vh;
        overflow-y: auto;
    }

    .site-header .navbar-nav .nav-link {
        padding: 0.65rem 0.85rem !important;
        color: var(--header-nav-color);
        border-radius: var(--radius-md);
    }

    .site-header .navbar-nav .nav-link:hover,
    .site-header .navbar-nav .nav-link:focus {
        background-color: var(--header-nav-hover-bg);
        color: var(--header-nav-hover);
    }

    .site-header .navbar-nav .nav-link.active {
        color: var(--header-nav-active);
        background-color: var(--header-nav-active-bg);
    }

    .site-header .dropdown-mega-grid {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid var(--border-color);
        background: #F8FAFC;
        grid-template-columns: 1fr;
        padding: 0.5rem;
        margin-top: 0.5rem;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .site-header .dropdown-mega-grid.show {
        display: grid !important;
    }

    .hero-section {
        padding: 3.5rem 0 2.5rem 0;
        text-align: center;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-trust-bar {
        justify-content: center;
    }

    .studio-workbench {
        padding: 1.5rem;
    }

    .channels-matrix {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .editorial-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .editorial-content,
    .editorial-aside {
        width: 100%;
    }

    .clean-accordion {
        margin-top: 1rem;
    }

    .minimal-cta-banner {
        padding: 2.5rem 1.5rem;
        text-align: center;
    }

    .minimal-cta-banner .d-flex {
        justify-content: center !important;
    }

    .site-footer {
        padding: 3.5rem 0 1.5rem 0;
    }

    .footer-brand-col {
        margin-bottom: 2rem;
    }
}

/* ==========================================================================
   Phablets & Small Tablets (< 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    h1, .h1, .hero-title {
        font-size: 1.85rem;
        letter-spacing: -0.02em;
    }

    h2, .h2, .section-title {
        font-size: 1.5rem;
        letter-spacing: -0.015em;
    }

    h3, .h3 {
        font-size: 1.25rem;
    }

    .channel-strip {
        gap: 0.35rem;
        padding-bottom: 0.25rem;
    }

    .channel-tab {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-icon-box {
        width: 48px;
        height: 48px;
    }

    .upload-icon-box i {
        font-size: 1.35rem;
    }

    .options-panel-box {
        padding: 1.25rem;
    }

    .workbench-step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .metrics-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .metric-item {
        padding: 0.75rem 0.5rem;
    }

    .metric-value {
        font-size: 1.35rem;
    }

    .file-name {
        max-width: 100%;
    }

    .specs-table th,
    .specs-table td {
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Standard Mobile Screens (< 576px)
   (Includes iPhone 12/13/14/15/16 Pro Max 430px, 414px, 390px)
   ========================================================================== */
@media (max-width: 575.98px) {
    body {
        font-size: 15px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 1.45rem + 1.5vw, 2rem);
        line-height: 1.25;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-pill {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-trust-bar {
        gap: 0.5rem;
    }

    .trust-pill {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }

    .studio-workbench {
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .channels-matrix {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .channel-card {
        padding: 1.15rem;
    }

    .options-panel-box {
        padding: 1rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .fulfillment-switches {
        grid-template-columns: 1fr;
    }

    .btn-action-primary {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }

    .result-box-inner {
        padding: 1.25rem 1rem;
    }

    .metrics-strip {
        grid-template-columns: 1fr 1fr;
    }

    .minimal-cta-banner {
        padding: 2rem 1rem;
    }

    .minimal-cta-banner h2 {
        font-size: 1.45rem;
    }

    .site-footer {
        padding: 2.75rem 0 1.5rem 0;
    }

    .site-footer .footer-heading {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .site-footer .footer-link {
        font-size: 0.875rem;
        padding: 0.2rem 0;
    }

    .file-queue-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .file-item {
        padding: 0.75rem 0.85rem;
        gap: 0.75rem;
    }

    .file-pdf-badge {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .file-pdf-badge .file-pdf-icon {
        font-size: 1.2rem;
    }

    .file-remove-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .file-remove-btn .file-remove-icon {
        width: 16px;
        height: 16px;
    }

    .file-name {
        max-width: 100%;
    }
}

/* ==========================================================================
   Compact Mobile Screens (360px to 375px)
   ========================================================================== */
@media (max-width: 375.98px) {
    .site-header .navbar-brand {
        font-size: 1.1rem;
    }

    .site-header .navbar-brand img,
    .site-header .navbar-brand .brand-logo {
        height: 33px;
    }

    .brand-badge {
        display: none;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .studio-workbench {
        padding: 0.85rem;
    }

    .upload-zone {
        padding: 1.5rem 0.5rem;
    }

    .file-item {
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
    }

    .metric-value {
        font-size: 1.2rem;
    }

    .minimal-cta-banner {
        padding: 1.75rem 0.85rem;
    }
}

/* ==========================================================================
   Ultra-Compact Viewports (320px)
   ========================================================================== */
@media (max-width: 320.98px) {
    body {
        font-size: 14px;
    }

    .site-header .navbar-brand img,
    .site-header .navbar-brand .brand-logo {
        height: 30px;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .channel-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .specs-table {
        font-size: 0.8rem;
    }

    .metrics-strip {
        grid-template-columns: 1fr;
    }
}
