/* Styles for overview.php - Heatmap page */

/* Heatmap container */
.heatmap-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.heatmap-title {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.heatmap-canvas {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    /* Light mode placeholder */
}

#orderSelection {
    width: 100%;
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 0 20px;
}

.overview-filter-panel {
    position: relative;
}

.overview-filter-panel::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.overview-filter-header,
.overview-filter-form {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.overview-filter-header {
    padding: 24px 28px 18px;
    margin-bottom: 16px;
    text-align: left;
}

.overview-section-kicker {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.overview-filter-header h3 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 1.35rem;
}

.overview-filter-description {
    margin: 0;
    color: var(--text-secondary);
    max-width: 720px;
}

.overview-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 24px 28px 28px;
}

.overview-filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.overview-filter-field input,
.overview-filter-field select {
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-color);
    color: var(--text-primary);
    font: inherit;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.overview-filter-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.overview-filter-field input:focus,
.overview-filter-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.overview-filter-submit {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 52px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.overview-filter-submit:hover,
.overview-filter-submit:focus-visible {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.overview-filter-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15), var(--shadow-light);
}

.overview-filter-submit:active {
    transform: translateY(0);
}

body.dark-mode .overview-filter-field input,
body.dark-mode .overview-filter-field select {
    background-color: #2c2c2c;
    border-color: #616161;
    color: var(--text-primary);
}

body.dark-mode .overview-filter-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e0e0e0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

body.dark-mode .overview-filter-field input:focus,
body.dark-mode .overview-filter-field select:focus {
    background-color: #383838;
}

body.dark-mode .overview-filter-submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25), var(--shadow-light);
}

body.dark-mode .heatmap-canvas {
    /* Dark mode placeholder */
}

/* Work in progress banner */
.wip-banner {
    text-align: center;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    background: #fee2e2;
    border: 2px solid #dc2626;
    border-radius: 8px;
}

.wip-banner h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #dc2626;
    font-weight: 700;
}

/* Dark mode adjustments */
body.dark-mode .wip-banner {
    background: #7f1d1d;
    border-color: #ef4444;
}

body.dark-mode .wip-banner h1 {
    color: #fca5a5;
}

/* Branch selection for overview */
.overview-branch-selection {
    max-width: 420px;
    margin: 0 auto;
}

.overview-branch-selection label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: left;
}

/* Back button for heatmap */
.heatmap-back-btn {
    display: block;
    margin: 0 auto 20px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.heatmap-back-btn:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .heatmap-canvas {
        height: 500px;
    }

    .heatmap-title {
        font-size: 1.5rem;
    }

    .overview-filter-form {
        grid-template-columns: 1fr;
    }

    .overview-filter-submit {
        width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 480px) {
    .heatmap-container {
        padding: 0 12px;
    }

    .heatmap-canvas {
        height: 400px;
        border-radius: 8px;
    }

    .heatmap-title {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }

    #orderSelection {
        padding: 0 12px;
        margin-top: 24px;
    }

    .overview-filter-panel::before {
        left: 12px;
        right: 12px;
    }

    .overview-filter-header,
    .overview-filter-form {
        padding-left: 16px;
        padding-right: 16px;
    }

    .overview-filter-header {
        padding-top: 20px;
        padding-bottom: 16px;
    }

    .overview-filter-form {
        padding-top: 18px;
        padding-bottom: 20px;
        gap: 16px;
    }

    .wip-banner {
        padding: 16px;
        margin: 16px 12px;
    }

    .wip-banner h1 {
        font-size: 1rem;
    }
}