/* PWA Specific Styles for better native-like experience */

/* Hide browser UI elements when running as PWA */
@media (display-mode: standalone) {
    body {
        /* Ensure PWA has same styling as website */
        background-color: #f8f9fa;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Status bar styling for iOS PWA */
    .navbar {
        padding-top: env(safe-area-inset-top);
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    }
    
    /* PWA specific button styling */
    .btn-primary {
        background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
        border: none;
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    }
    
    .btn-primary:hover {
        background: linear-gradient(135deg, #b8860b 0%, #d4af37 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    }
    
    /* Calendar styling in PWA mode */
    .calendar-day {
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        border: 1px solid rgba(212, 175, 55, 0.1);
    }
    
    .calendar-day.available {
        background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
        border-color: rgba(46, 125, 46, 0.2);
    }
    
    .calendar-day.blocked {
        background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
        border-color: rgba(114, 28, 36, 0.2);
    }
    
    /* Contact buttons in PWA */
    .contact-btn {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 1px solid rgba(212, 175, 55, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .contact-btn:hover {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-color: rgba(212, 175, 55, 0.3);
    }
    
    /* Hero section in PWA */
    .hero {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding-top: calc(4rem + env(safe-area-inset-top));
    }
    
    /* Portfolio items in PWA */
    .portfolio-item {
        background: #ffffff;
        border: 1px solid rgba(212, 175, 55, 0.1);
    }
    
    /* Admin Dashboard - Complete Light Mode Override */
    .admin-dashboard {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        background-color: #f8f9fa !important;
        min-height: 100vh;
        padding-top: env(safe-area-inset-top);
        color: #333 !important;
    }
    
    .admin-nav {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        background-color: #ffffff !important;
        border-bottom: 1px solid #e0e0e0 !important;
        color: #333 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    .admin-nav-content {
        color: #333 !important;
    }
    
    .admin-brand h1 {
        color: #d4af37 !important;
    }
    
    .admin-nav-links {
        color: #333 !important;
    }
    
    .nav-link {
        color: #333 !important;
        background-color: transparent !important;
    }
    
    .nav-link:hover {
        background-color: #f5f5f5 !important;
        color: #d4af37 !important;
    }
    
    .logout-btn {
        color: #dc3545 !important;
    }
    
    .logout-btn:hover {
        background-color: #f8d7da !important;
        color: #721c24 !important;
    }
    
    /* Admin Statistics */
    .stats-grid {
        background-color: transparent !important;
    }
    
    .stat-card {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        background-color: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        color: #333 !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    }
    
    .stat-card h3 {
        color: #d4af37 !important;
    }
    
    .stat-card p {
        color: #666 !important;
    }
    
    .stat-icon {
        color: #d4af37 !important;
    }
    
    /* Admin Calendar */
    .admin-calendar .calendar-container {
        background-color: #ffffff !important;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        border: 1px solid #e0e0e0 !important;
        color: #333 !important;
    }
    
    .admin-calendar .calendar-header {
        background-color: #f8f9fa !important;
        color: #333 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .admin-calendar .calendar-header h3 {
        color: #d4af37 !important;
    }
    
    .admin-calendar .calendar-weekdays {
        background-color: #f8f9fa !important;
        color: #666 !important;
    }
    
    .admin-calendar .calendar-weekdays div {
        color: #666 !important;
        background-color: transparent !important;
    }
    
    .admin-calendar .calendar-day {
        background-color: #ffffff !important;
        color: #333 !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    .admin-calendar .calendar-day.available {
        background-color: #e8f5e8 !important;
        color: #2e7d2e !important;
        border-color: rgba(46, 125, 46, 0.3) !important;
    }
    
    .admin-calendar .calendar-day.blocked {
        background-color: #f8d7da !important;
        color: #721c24 !important;
        border-color: rgba(114, 28, 36, 0.3) !important;
    }
    
    .admin-calendar .calendar-day.past {
        background-color: #f8f9fa !important;
        color: #6c757d !important;
        border-color: #dee2e6 !important;
    }
    
    /* Quick Actions */
    .quick-actions {
        background-color: transparent !important;
        color: #333 !important;
    }
    
    .quick-actions h3 {
        color: #333 !important;
    }
    
    .action-buttons {
        background-color: transparent !important;
    }
    
    /* PWA splash screen styling */
    @supports (display-mode: standalone) {
        :root {
            --status-bar-height: env(safe-area-inset-top);
        }
        
        body {
            padding-top: var(--status-bar-height);
        }
    }
}

/* COMPREHENSIVE Light Mode Force for PWA */
@media (display-mode: standalone) {
    /* Base styling - force light everywhere */
    *, *::before, *::after {
        color-scheme: light !important;
    }
    
    html {
        background-color: #ffffff !important;
        color-scheme: light !important;
    }
    
    body {
        background-color: #f8f9fa !important;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        color: #333 !important;
    }
    
    /* Navigation */
    .navbar, nav {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        background-color: #ffffff !important;
        color: #333 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    /* Hero Section */
    .hero {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        background-color: #f8f9fa !important;
        color: #333 !important;
    }
    
    /* Sections */
    section {
        background-color: #ffffff !important;
        color: #333 !important;
    }
    
    .about, .contact {
        background-color: #f5f5f5 !important;
        background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%) !important;
    }
    
    /* Calendar - Complete Override */
    .calendar-container {
        background-color: #ffffff !important;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        border: 1px solid #e0e0e0 !important;
        color: #333 !important;
    }
    
    .calendar-header {
        background-color: #f8f9fa !important;
        color: #333 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .calendar-header h3 {
        color: #d4af37 !important;
    }
    
    .calendar-nav {
        background-color: #ffffff !important;
        color: #d4af37 !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    .calendar-weekdays {
        background-color: #f8f9fa !important;
        color: #666 !important;
    }
    
    .calendar-weekdays div {
        color: #666 !important;
        background-color: transparent !important;
    }
    
    .calendar-days {
        background-color: #ffffff !important;
    }
    
    .calendar-day {
        background-color: #ffffff !important;
        color: #333 !important;
        border: 1px solid #e0e0e0 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
    
    .calendar-day.available {
        background-color: #e8f5e8 !important;
        background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%) !important;
        color: #2e7d2e !important;
        border-color: rgba(46, 125, 46, 0.3) !important;
    }
    
    .calendar-day.blocked {
        background-color: #f8d7da !important;
        background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
        color: #721c24 !important;
        border-color: rgba(114, 28, 36, 0.3) !important;
    }
    
    .calendar-day.past {
        background-color: #f8f9fa !important;
        color: #6c757d !important;
        border-color: #dee2e6 !important;
    }
    
    .calendar-day.other-month {
        background-color: #f1f3f4 !important;
        color: #ccc !important;
        border-color: #e9ecef !important;
    }
    
    .calendar-legend {
        background-color: #f8f9fa !important;
        color: #333 !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    
    .legend-item {
        color: #333 !important;
    }
    
    .legend-color.available {
        background-color: #e8f5e8 !important;
    }
    
    .legend-color.blocked {
        background-color: #f8d7da !important;
    }
    
    .legend-color.past {
        background-color: #f8f9fa !important;
    }
    
    /* Contact Buttons */
    .contact-btn {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        background-color: #ffffff !important;
        color: #333 !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    }
    
    .contact-btn span {
        color: #333 !important;
    }
    
    /* Portfolio */
    .portfolio-item {
        background-color: #ffffff !important;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        border: 1px solid rgba(212, 175, 55, 0.1) !important;
        color: #333 !important;
    }
    
    .portfolio-overlay {
        background: linear-gradient(transparent, rgba(0,0,0,0.8)) !important;
        color: #ffffff !important;
    }
    
    /* Buttons */
    .btn {
        color: #333 !important;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%) !important;
        background-color: #d4af37 !important;
        color: #ffffff !important;
        border: none !important;
    }
    
    .btn-secondary {
        background-color: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    .btn-outline {
        background-color: transparent !important;
        color: #d4af37 !important;
        border: 2px solid #d4af37 !important;
    }
    
    /* Text Elements - Comprehensive Override */
    h1, h2, h3, h4, h5, h6 {
        color: #333 !important;
    }
    
    p, span, div, a, li, td, th {
        color: #333 !important;
    }
    
    /* Brand/Primary Color Elements */
    .nav-brand h1, 
    section h2, 
    .hero-text h1,
    .calendar-header h3 {
        color: #d4af37 !important;
    }
    
    /* Secondary Text */
    .hero-text h2, 
    .hero-text p,
    .about-content p,
    .calendar-legend .legend-item,
    .contact-subtitle {
        color: #666 !important;
    }
    
    /* Footer */
    footer {
        background-color: #333 !important;
        color: #ffffff !important;
    }
    
    footer h3, footer p, footer a {
        color: #ffffff !important;
    }
    
    .contact-link {
        color: #ffffff !important;
    }
    
    .contact-link:hover {
        color: #d4af37 !important;
    }
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) and (display-mode: standalone) {
    .btn-primary {
        background: #d4af37;
        border: 2px solid #000000;
        color: #000000;
    }
    
    .calendar-day {
        border: 2px solid #000000;
    }
    
    .contact-btn {
        border: 2px solid #d4af37;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) and (display-mode: standalone) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
