/* ================================================================
   EpiAtlasz - Reports Page Styles
   Version: 1.0.0
   Last Updated: 2026-07-15
   Description: Styles for the reports download page including panels,
                disease hierarchy, color indicators, and button states
================================================================ */

/* ================================================================
   MAIN CONTAINER
================================================================ */
.reports-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ================================================================
   SELECTION GRID & PANELS
================================================================ */
.selection-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.selection-panel {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: left;
}
/* 
.selection-panel:hover {
    box-shadow: 0 8px 24px rgba(2, 33, 54, 0.10);
    transform: translateY(-4px);
} */

/* Color-coded top borders for different panels */
.selection-panel--disease {
    border-top: 4px solid var(--color-accent-blue);
    grid-column: 1;
    grid-row: 1 / 3;
}

.selection-panel--area {
    border-top: 4px solid var(--color-accent-yellow);
    grid-column: 2;
    grid-row: 1;
}

.panel-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gray-200);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.875rem;
}

/* ================================================================
   DISEASE HIERARCHY
================================================================ */
.disease-category {
    margin-bottom: 0.75rem;
}

.category-header {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-gray-800);
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.disease-options {
    margin-left: 0.5rem;
}

/* ================================================================
   RADIO BUTTON OPTIONS
================================================================ */
.option-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.radio-option:hover:not(.radio-option--disabled) {
    background-color: var(--color-gray-50);
}

.radio-option--disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

.radio-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

.radio-option-label {
    font-size: 0.85rem;
    color: var(--color-gray-800);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.radio-option--disabled .radio-option-label {
    cursor: not-allowed;
}

/* ================================================================
   DISEASE ICON INDICATORS
   SVG icons colored to match disease colors
================================================================ */
.disease-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.disease-indicator svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Color the SVG fill dynamically */
.disease-indicator svg .cls-1 {
    fill: currentColor;
}

.soon-badge {
    font-size: 0.7rem;
    color: var(--color-gray-500);
    font-weight: 500;
    font-style: italic;
    margin-left: auto;
}

/* ================================================================
   LANGUAGE/FORMAT SELECT
================================================================ */
.select-wrapper {
    margin-bottom: 0.75rem;
}

.select-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.4rem;
    display: block;
}

.select-box {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    border: 1.5px solid var(--color-gray-300);
    border-radius: 6px;
    background-color: var(--color-white);
    color: var(--color-gray-800);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.select-box:hover {
    border-color: var(--color-primary);
}

.select-box:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(2, 33, 54, 0.1);
}

.select-box:disabled {
    background-color: var(--color-gray-100);
    cursor: not-allowed;
    opacity: 0.6;
}

.selection-panel--action {
    border-top: 4px solid var(--color-accent-orange);
    grid-column: 2;
    grid-row: 2;
}

/* ================================================================
   ACTION PANEL & DOWNLOAD BUTTON
================================================================ */

/* ================================================================
   DOWNLOAD BUTTON WITH STATES
   Three states: default, loading, success, fail
================================================================ */
.download-button {
    width: 100%;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-highlight), #e55700);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: 0 4px 6px rgba(255, 97, 0, 0.25);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-button:hover:not(:disabled) {
    /* transform: translateY(-2px); */
    box-shadow: 0 8px 16px rgba(255, 97, 0, 0.35);
    background: linear-gradient(135deg, var(--color-highlight), #e55700);
}

.download-button:active:not(:disabled) {
    /* transform: translateY(0); */
    box-shadow: 0 4px 6px rgba(255, 97, 0, 0.25);
}

.download-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Button Icon */
.button-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Loading State */
.download-button--loading {
    background: linear-gradient(135deg, var(--color-gray-500), #4b5563);
    cursor: wait;
}

.download-button--loading .button-icon {
    animation: spin 1s linear infinite;
}

/* Success State */
.download-button--success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

/* Fail State */
.download-button--fail {
    background: linear-gradient(135deg, #ef4444, var(--color-error));
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.25);
}

/* ================================================================
   ICONS (SVG inline)
================================================================ */
.icon-download {
    /* Default download icon */
}

.icon-spinner {
    /* Loading spinner - rotates via animation */
}

.icon-check {
    /* Success checkmark */
}

.icon-error {
    /* Error X icon */
}

/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ================================================================
   RESPONSIVE DESIGN
================================================================ */
@media (max-width: 968px) {
    .selection-grid {
        grid-template-columns: 1fr;
    }
    
    .selection-panel--disease,
    .selection-panel--area,
    .selection-panel--action {
        grid-column: 1;
        grid-row: auto;
    }
    
    .reports-container {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .selection-panel {
        padding: 1.25rem;
    }
    
    /* Single column for options on mobile */
    .option-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .reports-container {
        padding: 1.25rem 0.75rem;
    }
    
    .selection-grid {
        gap: 1.25rem;
    }
    
    .selection-panel {
        padding: 1rem;
    }
    
    .download-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}
