/* ============================================================
   MOBILE RESPONSIVE STYLES
   ============================================================ */

/* Show rotate message by default (hidden until portrait) */
.rotate-message {
    display: none;
}

/* Portrait mode - show rotate message, hide entries */
@media (max-width: 767px) and (orientation: portrait) {
    /* Fix header layout */
    header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 15px;
    }
    
    header .header-logo {
        height: 40px;
        width: auto;
        order: 1;
    }
    
    header h1 {
        font-size: 18px;
        order: 2;
        word-wrap: break-word;
        white-space: normal;
        flex: 1;
        min-width: 120px;
        margin: 0;
    }
    
    header .subtitle {
        font-size: 11px;
        order: 3;
        width: 100%;
        margin: 0;
        opacity: 0.8;
    }
    
    /* Show rotate message */
    .rotate-message {
        display: block !important;
        background: #fff3cd;
        border: 2px solid #ffc107;
        border-radius: 12px;
        padding: 30px 20px;
        text-align: center;
        margin: 20px 0;
        font-size: 18px;
        color: #856404;
        font-weight: 500;
    }
    
    .rotate-message .icon {
        font-size: 48px;
        display: block;
        margin-bottom: 12px;
    }
    
    .rotate-message .small-text {
        font-size: 14px;
        font-weight: normal;
        color: #666;
        display: block;
        margin-top: 8px;
    }
    
    /* Hide the rota table */
    .rota-grid {
        display: none !important;
    }
    
    /* Hide the orientation hint at the bottom */
    .rota-container:after {
        display: none !important;
    }
    
    /* Fix controls layout */
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
        min-width: unset;
    }
    
    .export-group {
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .export-group .btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Landscape mode - show table, hide rotate message */
@media (max-width: 767px) and (orientation: landscape) {
    .rotate-message {
        display: none !important;
    }
    
    .rota-grid {
        display: table !important;
        min-width: 600px;
        font-size: 11px;
    }
    
    .rota-container {
        overflow-x: auto;
    }
    
    .rota-grid th,
    .rota-grid td {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .rota-grid {
        font-size: 13px;
    }
}

/* Print styles */
@media print {
    .controls,
    .export-group,
    footer,
    .rotate-message {
        display: none !important;
    }
    
    .rota-grid {
        display: table !important;
        font-size: 10px;
    }
    
    .rota-grid th {
        background: #003366 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}