/* ==========================================
   GLOBAL DEVELOPER BANNER - MOBILE FIRST
   ========================================== */

/* Base Banner Styles */
.developer-banner {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000; /* Above header */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    height: 48px; /* Fixed height for mobile */
    overflow: hidden; /* Prevent content overflow */
}

/* Container */
.developer-banner-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 4px 12px !important; /* Reduced padding */
    gap: 8px !important; /* Reduced gap */
    flex-wrap: nowrap !important;
    height: 48px !important; /* Match banner height */
    max-height: 48px !important;
}

/* Content Section */
.developer-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0; /* Allow text to shrink */
}

/* Icon */
.developer-banner-icon {
    color: white !important;
    font-size: 20px !important;
    flex-shrink: 0;
    display: none; /* Hide on mobile by default */
}

/* Text Container */
.developer-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* Allow text to shrink */
}

/* Title */
.developer-banner-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Subtitle */
.developer-banner-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Button */
.developer-banner-button {
    background: white !important;
    color: var(--color-secondary) !important;
    font-weight: 600 !important;
    padding: 4px 10px !important; /* Reduced padding */
    min-height: 28px !important; /* Smaller for mobile */
    height: 28px !important;
    font-size: 0.7rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 6px !important;
    line-height: 1 !important; /* Tight line height */
}

.developer-banner-button:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px);
}

/* Main Header Positioning */
.main-header {
    position: fixed !important;
    top: 48px !important; /* Below banner */
    left: 0 !important;
    right: 0 !important;
    z-index: 1500 !important;
    height: 64px !important;
}

/* Main Layout Responsive Padding */
.main-layout-container {
    padding-top: 112px !important; /* 48px banner + 64px header */
}

.main-content-area {
    min-height: calc(100vh - 112px) !important;
}

.main-drawer {
    margin-top: 112px !important;
}

/* ==========================================
   MOBILE DEVICES (320px - 480px)
   iPhone SE, iPhone 12 Mini, Small Android
   ========================================== */
@media (max-width: 480px) {
    .developer-banner {
        min-height: 48px;
    }
    
    .main-header {
        top: 48px !important;
    }
    
    .main-layout-container {
        padding-top: 112px !important; /* 48px banner + 64px header */
    }
    
    .main-content-area {
        min-height: calc(100vh - 112px) !important;
    }
    
    .main-drawer {
        margin-top: 112px !important;
    }
    
    .developer-banner-container {
        padding: 8px 12px !important;
    }
    
    .developer-banner-icon {
        display: none !important;
    }
    
    .developer-banner-title {
        font-size: 0.75rem;
    }
    
    .developer-banner-subtitle {
        font-size: 0.7rem;
    }
    
    .developer-banner-button {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        min-height: 32px !important;
    }
    
    /* Stack vertically on very small screens */
    @media (max-width: 360px) {
        .developer-banner-container {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
        
        .developer-banner-button {
            width: 100%;
            justify-content: center;
        }
    }
}

/* ==========================================
   MEDIUM MOBILE (481px - 767px)
   iPhone 12, iPhone 13, Standard Android
   ========================================== */
@media (min-width: 481px) and (max-width: 767px) {
    .developer-banner-container {
        padding: 14px 20px !important;
    }
    
    .developer-banner-title {
        font-size: 1rem;
    }
    
    .developer-banner-subtitle {
        font-size: 0.8rem;
    }
    
    .developer-banner-button {
        padding: 10px 20px !important;
        min-height: 40px !important;
    }
}

/* ==========================================
   TABLETS (768px - 1023px)
   iPad, Android Tablets
   ========================================== */
@media (min-width: 768px) {
    .developer-banner {
        min-height: 48px;
    }
    
    .developer-banner-icon {
        display: block !important;
        font-size: 22px !important;
    }
    
    .developer-banner-title {
        font-size: 0.9rem;
    }
    
    .developer-banner-subtitle {
        font-size: 0.75rem;
    }
    
    .developer-banner-button {
        padding: 8px 16px !important;
        min-height: 36px !important;
        height: 36px !important;
        font-size: 0.8rem !important;
    }
    
    .main-header {
        top: 48px !important;
    }
    
    .main-layout-container {
        padding-top: 112px !important; /* 48px banner + 64px header */
    }
    
    .main-content-area {
        min-height: calc(100vh - 112px) !important;
    }
    
    .main-drawer {
        margin-top: 112px !important;
    }
}

/* ==========================================
   DESKTOP (1024px+)
   Full Desktop Experience
   ========================================== */
@media (min-width: 1024px) {
    .developer-banner {
        height: 56px; /* Fixed height for desktop */
        overflow: hidden;
    }
    
    .developer-banner-container {
        padding: 6px 20px !important; /* Reduced padding */
        flex-wrap: nowrap;
        height: 56px !important;
        max-height: 56px !important;
    }
    
    .developer-banner-icon {
        display: block !important;
        font-size: 24px !important;
    }
    
    .developer-banner-title {
        font-size: 1rem;
    }
    
    .developer-banner-subtitle {
        font-size: 0.8rem;
    }
    
    .developer-banner-button {
        padding: 6px 16px !important; /* Reduced padding */
        min-height: 36px !important; /* Smaller to fit 56px banner */
        height: 36px !important;
        font-size: 0.8rem !important;
        line-height: 1 !important;
    }
    
    .main-header {
        top: 56px !important;
    }
    
    .main-layout-container {
        padding-top: 120px !important; /* 56px banner + 64px header */
    }
    
    .main-content-area {
        min-height: calc(100vh - 120px) !important;
    }
    
    .main-drawer {
        margin-top: 120px !important;
    }
}

/* ==========================================
   LARGE DESKTOP (1440px+)
   High Resolution Displays
   ========================================== */
@media (min-width: 1440px) {
    .developer-banner {
        height: 60px; /* Fixed height for large desktop */
        overflow: hidden;
    }
    
    .developer-banner-container {
        padding: 8px 28px !important; /* Reduced padding */
        height: 60px !important;
        max-height: 60px !important;
    }
    
    .developer-banner-icon {
        font-size: 26px !important;
    }
    
    .developer-banner-title {
        font-size: 1.1rem;
    }
    
    .developer-banner-subtitle {
        font-size: 0.85rem;
    }
    
    .developer-banner-button {
        padding: 8px 20px !important; /* Reduced padding */
        min-height: 40px !important; /* Smaller to fit 60px banner */
        height: 40px !important;
        font-size: 0.85rem !important;
        line-height: 1 !important;
    }
    
    .main-header {
        top: 60px !important;
    }
    
    .main-layout-container {
        padding-top: 124px !important; /* 60px banner + 64px header */
    }
    
    .main-content-area {
        min-height: calc(100vh - 124px) !important;
    }
    
    .main-drawer {
        margin-top: 124px !important;
    }
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   iOS Safari, Android Chrome
   ========================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .developer-banner-button {
        min-height: 44px !important; /* Apple HIG minimum */
        min-width: 44px !important;
        padding: 12px 20px !important;
    }
    
    /* Prevent text selection on touch */
    .developer-banner-title,
    .developer-banner-subtitle {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    /* Smooth tap feedback */
    .developer-banner-button {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
        transition: transform 0.1s ease;
    }
    
    .developer-banner-button:active {
        transform: scale(0.98);
    }
}

/* ==========================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-height: 480px) and (orientation: landscape) {
    .developer-banner {
        position: relative; /* Don't stick on landscape */
    }
    
    .developer-banner-container {
        padding: 8px 16px !important;
    }
    
    .developer-banner-title {
        font-size: 0.9rem;
    }
    
    .developer-banner-subtitle {
        display: none; /* Hide subtitle in landscape to save space */
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .developer-banner {
        border-bottom: 2px solid white;
    }
    
    .developer-banner-button {
        border: 2px solid var(--color-secondary) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .developer-banner-button {
        transition: none;
    }
    
    .developer-banner-button:active {
        transform: none;
    }
}

/* Dark mode adjustments (if system prefers dark) */
@media (prefers-color-scheme: dark) {
    .developer-banner {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    }
}
