/* Import main site styles */
@import url('../style.css');

/* Additional styles specific to client portal */
.report-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.report-content {
    min-height: 400px;
}

.report-section {
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.report-section h3 {
    color: #3b99d9;
    font-family: Montserrat, sans-serif;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.data-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

.data-item .label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.data-item .value {
    font-size: 24px;
    font-weight: 700;
    color: #3b99d9;
    font-family: Montserrat, sans-serif;
}

/* Ensure proper box sizing for all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .password-container {
        margin: 10px;
        padding: 20px 15px;
        border-radius: 8px;
        max-width: 95% !important;
        width: 95% !important;
    }
    
    .password-overlay {
        padding: 10px;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .navigation-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-section .w-container {
        text-align: center;
        padding: 0 15px;
    }
    
    .report-section {
        margin-bottom: 25px !important;
        padding: 20px 15px !important;
        border-radius: 8px;
    }
    
    .report-section h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .report-section h3 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }
    
    .report-section h4 {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }
    
    .report-section p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    .data-item {
        padding: 12px;
    }
    
    .data-item .value {
        font-size: 20px;
    }
    
    /* Mobile table styles */
    table {
        font-size: 12px !important;
    }
    
    table th, table td {
        padding: 8px 4px !important;
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.3 !important;
    }
    
    /* Make wide tables horizontally scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }
    
    /* Video responsiveness */
    video {
        max-width: 100%;
        height: auto;
    }
    
    /* Google Sheet iframe responsiveness */
    iframe {
        max-width: 100%;
        min-height: 400px;
    }
    
    /* Override inline grid styles */
    [style*="display: grid"] {
        display: block !important;
    }
    
    [style*="grid-template-columns"] {
        display: block !important;
    }
    
    [style*="gap: 40px"] {
        gap: 20px !important;
    }
    
    /* Container width overrides */
    .w-container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Video section mobile optimization */
    .video-section {
        margin-left: -15px !important;
        margin-right: -15px !important;
        border-radius: 0 !important;
    }
    
    .video-section > div {
        padding: 15px !important;
    }
    
    /* Reduce excessive padding on mobile */
    [style*="padding: 30px"] {
        padding: 15px !important;
    }
    
    [style*="padding: 40px"] {
        padding: 20px !important;
    }
    
    [style*="padding: 25px"] {
        padding: 15px !important;
    }
    
    /* Mobile margin adjustments */
    [style*="margin-bottom: 40px"] {
        margin-bottom: 20px !important;
    }
    
    [style*="margin-bottom: 30px"] {
        margin-bottom: 15px !important;
    }
    
    [style*="margin-bottom: 25px"] {
        margin-bottom: 15px !important;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .password-container {
        margin: 5px !important;
        padding: 15px 10px !important;
        max-width: 95% !important;
        width: 95% !important;
    }
    
    .report-section {
        padding: 15px 10px !important;
        margin-bottom: 15px !important;
    }
    
    .report-section h2 {
        font-size: 16px !important;
    }
    
    .report-section h3 {
        font-size: 14px !important;
    }
    
    .report-section h4 {
        font-size: 13px !important;
    }
    
    .report-section p {
        font-size: 12px !important;
    }
    
    .data-item .value {
        font-size: 18px;
    }
    
    table {
        font-size: 10px !important;
    }
    
    table th, table td {
        padding: 4px 2px !important;
        line-height: 1.2 !important;
    }
    
    /* Reduce margins and padding for very small screens */
    .header-section .w-container {
        padding: 0 10px !important;
    }
    
    .w-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Better touch targets for buttons and inputs */
    input, button {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improve text readability on small screens */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Very small screen adjustments */
    h1 {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    /* Make key values more prominent on small screens */
    .value-highlight {
        font-size: 18px !important;
    }
    
    /* Adjust iframe for very small screens */
    .iframe-container {
        height: 300px !important;
        margin: 10px 0;
    }
    
    /* Stack data items vertically with better spacing */
    .data-grid {
        gap: 10px;
    }
    
    .data-item {
        padding: 10px;
    }
    
    /* Adjust table containers for very small screens */
    .table-container {
        margin: 10px -10px;
        padding: 0 10px;
    }
    
    /* More aggressive padding reduction for very small screens */
    [style*="padding: 30px"] {
        padding: 10px !important;
    }
    
    [style*="padding: 40px"] {
        padding: 12px !important;
    }
    
    [style*="padding: 25px"] {
        padding: 10px !important;
    }
    
    .video-section > div {
        padding: 10px !important;
    }
}

/* Additional mobile-specific improvements */
@media (max-width: 768px) {
    /* Improve font sizes for better readability */
    h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }
    
    h3 {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }
    
    h4 {
        font-size: 16px !important;
        line-height: 1.3 !important;
    }
    
    p, li, td {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    /* Better spacing for mobile */
    .section {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    /* Improve button styles for mobile */
    .auth-button, .submit-button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        border-radius: 8px;
        margin-bottom: 10px;
        min-height: 48px; /* Better touch target */
    }
    
    /* Improve input styles for mobile */
    .auth-input {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        border-radius: 8px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        min-height: 48px; /* Better touch target */
    }
    
    /* Google Sheet iframe container mobile optimization */
    .iframe-container {
        position: relative;
        height: 400px !important; /* Shorter on mobile */
        margin: 15px 0;
    }
    
    /* Video container mobile optimization */
    .video-container {
        margin: 0 -15px 20px -15px; /* Full width on mobile */
    }
    
    /* Responsive iframe wrapper */
    .responsive-iframe {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        height: 0;
        overflow: hidden;
    }
    
    .responsive-iframe iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    /* Improve padding for containers */
    .w-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Better mobile card layouts */
    .report-section {
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Improve mobile table readability */
    table th {
        background-color: #f8f9fa !important;
        font-weight: 600 !important;
    }
    
    table tr:nth-child(even) {
        background-color: #f9f9f9 !important;
    }
    
    /* Better mobile text sizing for key information */
    .value-highlight {
        font-size: 20px !important;
        font-weight: 700 !important;
    }
}

/* Print styles */
@media print {
    .password-overlay,
    .navigation-bar,
    .footer {
        display: none !important;
    }
    
    .header-section {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    body {
        font-size: 12px;
    }
}
