/**
 * Responsive Styles
 * 
 * @package InsurishLink
 */

/* ==========================================================================
   Tablet Styles (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Header */
    .header-inner {
        padding: 0 15px;
        gap: 15px;
    }
    
    .site-logo img {
        height: 30px;
    }
    
    /* Hide desktop navigation */
    .main-navigation {
        display: none;
    }
    
    /* Hide desktop search in header */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile search */
    .mobile-only {
        display: block !important;
    }
    
    /* Main content - keep sidebar margin */
    /* .site-main {
        padding: 80px 20px 20px;
    }
    
    body.admin-bar .site-main {
        padding-top: calc(80px + 46px);
    } */
    
    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    /* Carrier cards grid */
    .insurance-companies-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        gap: 20px;
    }
}

/* ==========================================================================
   Mobile Styles (max-width: 600px)
   ========================================================================== */
@media (max-width: 600px) {
    /* Sidebar - Hide on mobile */
    .site-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .site-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Remove sidebar margin on mobile */
    .site-content.has-sidebar {
        margin-left: 0;
    }
    
    /* Main content adjustments */
    .site-main {
        padding: 15px;
    }
    
    /* Page header */
    .page-header {
        margin-bottom: 20px;
    }
    
    /* Insurance applications section */
    .insurance-applications-section {
        padding: 15px;
    }
    
    /* Carrier cards - Single column on mobile */
    .insurance-companies-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .insurance-company-card {
        min-height: 270px;
        padding: 20px;
    }
    
    /* Company logo */
    .company-logo {
        width: 90px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    /* LOB badges */
    .lob-badge {
        font-size: 11px;
        padding: 4px 10px;
        height: 24px;
    }
    
    /* Mobile search bar */
    .mobile-search-bar {
        margin-bottom: 15px;
    }
    
    /* Footer */
    .footer-inner {
        padding: 0 15px;
    }
}

/* ==========================================================================
   Small Mobile Styles (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    /* Further reduce padding */
    .site-main {
        padding: 10px;
    }
    
    /* Smaller text sizes */
    .page-title {
        font-size: 18px;
    }
    
    .applications-title {
        font-size: 18px;
    }
    
    .company-name {
        font-size: 15px;
    }
    
    /* Adjust card padding */
    .insurance-company-card {
        padding: 18px;
    }
    
    /* Smaller button */
    .view-details-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Landscape Mobile (orientation: landscape and max-height: 600px)
   ========================================================================== */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce header height in landscape */
    :root {
        --header-height: 50px;
    }
    
    .site-logo img {
        height: 30px;
    }
    
    /* Adjust sidebar for landscape */
    .sidebar-user {
        padding: 15px;
    }
    
    .sidebar-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .sidebar-username {
        font-size: 14px;
    }
    
    .sidebar-item {
        padding: 10px 20px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    /* Hide unnecessary elements */
    .site-header,
    .site-sidebar,
    .site-footer,
    .search-bar,
    .mobile-search-bar,
    .view-details-btn {
        display: none !important;
    }
    
    /* Remove margins and shadows */
    .site-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .insurance-applications-section {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .insurance-company-card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    /* Ensure proper spacing */
    .insurance-companies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* ==========================================================================
   High DPI/Retina Display Support
   ========================================================================== */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Ensure crisp borders */
    .insurance-company-card,
    .site-sidebar,
    .site-header {
        border-width: 0.5px;
    }
}

/* ==========================================================================
   Accessibility - Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Dark Mode Support (if needed in future)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}