/*
 * /projects/ecoADDRESS/css/drawers.css
 * Drawer expansion, drawer content fields, attribution links
 */


/* ================================================================
   DRAWER — full-width expansion below card row
   ================================================================ */

.fg-drawer {
    grid-column: 1 / -1;
    display: none;
    background: var(--card-bg);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px var(--card-shadow),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: drawerSlide 0.25s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.fg-drawer.open {
    display: block;
}

@keyframes drawerSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left accent border by panel */
.panel-physical .fg-drawer { border-left: 4px solid var(--panel-physical-accent); border-color: var(--panel-physical-border); border-left-color: var(--panel-physical-accent); }
.panel-eco .fg-drawer { border-left: 4px solid var(--panel-eco-accent); border-color: var(--panel-eco-border); border-left-color: var(--panel-eco-accent); }
.panel-living .fg-drawer { border-left: 4px solid var(--panel-living-accent); border-color: var(--panel-living-border); border-left-color: var(--panel-living-accent); }

.drawer-title {
    font-family: var(--font-data);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.panel-physical .drawer-title { color: var(--panel-physical-accent); }
.panel-eco .drawer-title { color: var(--panel-eco-accent); }
.panel-living .drawer-title { color: var(--panel-living-accent); }

.drawer-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    transition: color 0.15s;
}

.drawer-close:hover {
    color: var(--text-primary);
}


/* ================================================================
   DRAWER CONTENT — fields, species lists, etc.
   ================================================================ */

.drawer-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    margin-bottom: 0.75rem;
}

.drawer-field {
    display: flex;
    flex-direction: column;
}

.drawer-field .df-label {
    font-family: var(--font-data);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.drawer-field .df-value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-primary);
}

.drawer-attribution {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #E8E0D0;
    font-family: var(--font-data);
    font-size: 0.78rem;
    color: var(--text-light);
}

.drawer-attribution a {
    color: var(--panel-living-accent);
    text-decoration: none;
}
.drawer-attribution a:hover {
    text-decoration: underline;
}


/* ================================================================
   WATER BALANCE BAR CHART — monthly surplus/deficit visualization
   ================================================================ */

.water-balance-chart {
    margin: 1rem 0;
}

.water-balance-chart h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wb-chart {
    display: flex;
    gap: 2px;
    height: 8rem;
    align-items: stretch;
}

.wb-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.wb-bar-area {
    flex: 1;
    width: 100%;
    position: relative;
}

.wb-bar {
    position: absolute;
    left: 15%;
    width: 70%;
    border-radius: 2px;
    transition: height 0.3s ease;
}

.wb-surplus {
    background: #50b080;
    opacity: 0.8;
}

.wb-deficit {
    background: #c07050;
    opacity: 0.8;
}

.wb-zero-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--text-muted);
}

.wb-month {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    font-weight: 600;
}

.wb-val {
    font-size: 0.7rem;
    color: var(--text-light);
}