/**
 * Responsive Styles - Registro de Micções
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* ===== TABLET (768px+) ===== */
@media (min-width: 768px) {
    /* Body adjustments */
    body {
        padding-bottom: 0;
    }
    
    /* Desktop Navigation */
    .desktop-nav {
        display: flex;
        gap: 8px;
    }
    
    .desktop-nav .nav-link {
        padding: 8px 16px;
        border-radius: var(--border-radius-sm);
        color: var(--text-primary);
        text-decoration: none;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: var(--font-size-sm);
        font-weight: 500;
    }
    
    .desktop-nav .nav-link i {
        font-size: 18px;
    }
    
    .desktop-nav .nav-link:hover,
    .desktop-nav .nav-link.active {
        background: var(--accent-color);
        color: var(--secondary-color);
    }
    
    /* Hide Bottom Nav */
    .bottom-nav {
        display: none !important;
    }
    
    /* Container */
    .container {
        padding: 24px;
        max-width: 720px;
        margin: 0 auto;
    }
    
    /* Hero Section */
    .hero-icon {
        width: 100px;
        height: 100px;
    }
    
    .hero-icon i {
        font-size: 48px;
    }
    
    .hero-section h2 {
        font-size: var(--font-size-2xl);
    }
    
    /* Quick Stats */
    .quick-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Records List */
    .record-card {
        padding: 20px;
    }
    
    /* Modal */
    .modal-content {
        max-width: 500px;
    }
    
    /* Toast */
    .toast {
        bottom: 24px;
        min-width: 300px;
    }
}

/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
    :root {
        --header-padding: 40px;
    }
    
    /* Container */
    .container {
        max-width: 960px;
        padding: 32px;
    }
    
    /* Header */
    .app-header {
        padding: 0 var(--header-padding);
    }
    
    .header-logo h1 {
        font-size: 20px;
    }
    
    /* Desktop Nav */
    .desktop-nav {
        gap: 12px;
    }
    
    .desktop-nav .nav-link {
        padding: 10px 20px;
        font-size: var(--font-size-base);
    }
    
    /* Hero Section */
    .hero-section {
        padding: 48px 16px;
    }
    
    /* Action Section */
    .btn-large {
        padding: 24px 48px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Records Grid Layout */
    .records-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* FAQ */
    .faq-container {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* ===== LARGE DESKTOP (1440px+) ===== */
@media (min-width: 1440px) {
    /* Container */
    .container {
        max-width: 1200px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    /* Records Grid */
    .records-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .app-header,
    .bottom-nav,
    .header-actions,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-delete,
    .modal,
    .toast {
        display: none !important;
    }
    
    body {
        padding: 0;
        background: white;
        color: black;
    }
    
    .section {
        display: block !important;
    }
    
    .record-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: 16px;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-icon i {
        font-size: 28px;
    }
    
    .action-section {
        padding: 16px;
    }
    
    .btn-large {
        padding: 16px 32px;
        font-size: var(--font-size-lg);
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== HIGH CONTRAST ===== */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        border: 2px solid currentColor;
    }
}

/* ===== SAFE AREAS (iPhone X+) ===== */
@supports (padding: env(safe-area-inset-top)) {
    body {
        padding-top: max(60px, env(safe-area-inset-top));
        padding-bottom: max(70px, env(safe-area-inset-bottom));
    }
    
    .app-header {
        padding-top: env(safe-area-inset-top);
        padding-left: max(var(--header-padding), env(safe-area-inset-left));
        padding-right: max(var(--header-padding), env(safe-area-inset-right));
    }
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn-icon,
    .btn-delete,
    .faq-question {
        min-width:34px;
        min-height: 34px;
    }
    
    .nav-item {
        min-width: 60px;
        min-height: 56px;
    }
    
    /* Remove hover effects */
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-danger:hover,
    .record-card:hover,
    .stat-card:hover {
        transform: none;
    }
}
