/* BCR Club — custom styles beyond Tailwind CDN */

/* Comfort score colors */
.comfort-great { background-color: #22c55e; color: white; }
.comfort-fair { background-color: #eab308; color: white; }
.comfort-tough { background-color: #ef4444; color: white; }

/* AQI colors */
.aqi-good { background-color: #22c55e; color: white; }
.aqi-moderate { background-color: #eab308; color: white; }
.aqi-sensitive { background-color: #f97316; color: white; }
.aqi-unhealthy { background-color: #ef4444; color: white; }
.aqi-very-unhealthy { background-color: #7c3aed; color: white; }

/* Morning hours grid */
.morning-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    text-align: center;
}
.morning-grid .hour-cell {
    padding: 0.5rem 0.25rem;
    border-radius: 0.5rem;
    background: rgba(0,0,0,0.03);
}
@media (prefers-color-scheme: dark) {
    .morning-grid .hour-cell {
        background: rgba(255,255,255,0.05);
    }
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}
.photo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Card style */
.card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) {
    .card {
        background: #1f2937;
        box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
}

/* HTMX loading indicator */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}

/* Smooth transitions for HTMX swaps */
.htmx-swapping { opacity: 0; transition: opacity 100ms ease-out; }
.htmx-settling { opacity: 1; transition: opacity 200ms ease-in; }

/* Weather metric icons */
.metric-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}
.metric-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}
.metric-row .metric-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #6b7280;
    min-width: 0;
}
@media (prefers-color-scheme: dark) {
    .metric-row .metric-label { color: #9ca3af; }
}
.metric-row .metric-value {
    margin-left: auto;
    font-weight: 500;
    white-space: nowrap;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    cursor: pointer;
    padding: 1rem;
}
.lightbox img {
    max-width: calc(100% - 80px);
    max-height: calc(100% - 60px);
    object-fit: contain;
    border-radius: 0.5rem;
    cursor: default;
}
.lb-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    z-index: 51;
}
.lb-close:hover { opacity: 1; }
.lb-prev, .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    background: rgba(0,0,0,0.4);
    border: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    opacity: 0.7;
    z-index: 51;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { opacity: 1; background: rgba(0,0,0,0.6); }
.lb-bottom {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    z-index: 51;
}
.lb-counter {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}
.lb-download:hover { opacity: 1 !important; }
@media (max-width: 640px) {
    .lb-prev, .lb-next { font-size: 1.5rem; padding: 0.5rem 0.75rem; }
    .lightbox img { max-width: calc(100% - 20px); }
}
