/* static/css/warning.css
   Only warning-specific styles — layout comes from weather.css */

/* ── Step numbers ─────────────────────────────────────────────── */
.w-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #059669;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

/* ── Custom dropdown ──────────────────────────────────────────── */
.w-dd-wrap {
    margin-top: 0.85rem;
}

.w-dd-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.w-dd-label i {
    color: #059669;
    width: 14px;
}

.w-dd {
    position: relative;
}

/* Trigger button */
.w-dd-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.6rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: left;
}

.w-dd-btn:hover:not(:disabled) {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5,150,105,0.08);
}

.w-dd-btn:disabled {
    background: #f8fafc;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.w-dd-arrow {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* Open state */
.w-dd.open .w-dd-btn {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5,150,105,0.12);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.w-dd.open .w-dd-arrow {
    transform: rotate(180deg);
    color: #059669;
}

/* Dropdown menu */
.w-dd-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1.5px solid #059669;
    border-top: none;
    border-bottom-left-radius: 0.6rem;
    border-bottom-right-radius: 0.6rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    max-height: 180px;
    overflow-y: auto;
    z-index: 100;
    list-style: none;
    padding: 0.25rem 0;
    margin: 0;
}

.w-dd.open .w-dd-menu {
    display: block;
    animation: ddOpen 0.15s ease;
}

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

/* Menu items */
.w-dd-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #f1f5f9;
}

.w-dd-item:last-child { border-bottom: none; }

.w-dd-item:hover {
    background: #f0fdf4;
    color: #065f46;
}

.w-dd-item.selected {
    background: #ecfdf5;
    color: #065f46;
    font-weight: 600;
}

.w-dd-item.selected .w-dd-check {
    color: #059669;
    opacity: 1;
}

/* Checkmark — hidden by default */
.w-dd-check {
    font-size: 0.7rem;
    color: #059669;
    opacity: 0;
    width: 12px;
    flex-shrink: 0;
}

/* Disabled item (no station ID yet) */
.w-dd-item-disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.w-dd-item-disabled:hover {
    background: none;
    color: #9ca3af;
}

.w-dd-soon {
    margin-left: auto;
    font-size: 0.68rem;
    background: #fef3c7;
    color: #d97706;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Disabled dropdown wrapper */
.w-dd-disabled .w-dd-btn {
    background: #f8fafc;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.w-dd-disabled .w-dd-label { opacity: 0.5; }

/* ── Warning type toggle ──────────────────────────────────────── */
.w-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.w-type-btn { cursor: pointer; }
.w-type-btn input[type="radio"] { display: none; }

.w-type-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    background: #f8fafc;
    transition: all 0.15s ease;
}

.w-type-btn input:checked + .w-type-inner.cold {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.w-type-btn input:checked + .w-type-inner.heat {
    background: #fff7ed;
    border-color: #f97316;
    color: #c2410c;
}

/* ── Date input ───────────────────────────────────────────────── */
.w-date {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.w-date:focus {
    outline: none;
    border-color: #059669;
    background: white;
}

/* ── Submit button ────────────────────────────────────────────── */
.w-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #d1d5db;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.w-submit-btn.ready {
    background: #059669;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(5,150,105,0.3);
}

.w-submit-btn.ready:hover {
    background: #047857;
    box-shadow: 0 4px 12px rgba(5,150,105,0.4);
}

/* ── Loader ───────────────────────────────────────────────────── */
.w-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: #6b7280;
    font-size: 0.95rem;
}

/* ── Placeholder ──────────────────────────────────────────────── */
.w-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    gap: 1rem;
    text-align: center;
    color: #9ca3af;
}

.w-placeholder i {
    font-size: 3.5rem;
    color: #d1d5db;
}

.w-placeholder p {
    font-size: 1rem;
    max-width: 260px;
    line-height: 1.5;
}

/* ── Result header ────────────────────────────────────────────── */
.w-result-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.w-result-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.w-result-title i { color: #059669; }

.w-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.w-badge.cold { background: #eff6ff; color: #1d4ed8; }
.w-badge.heat { background: #fff7ed; color: #c2410c; }

.w-result-period {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ── Summary banner ───────────────────────────────────────────── */
.w-summary {
    padding: 0.9rem 1.1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.w-summary.low    { background: #f0fdf4; border-color: #16a34a; }
.w-summary.medium { background: #fffbeb; border-color: #d97706; }
.w-summary.high   { background: #fef2f2; border-color: #dc2626; }

.w-summary-label {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

/* ── Day cards ────────────────────────────────────────────────── */
.w-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .w-days { grid-template-columns: repeat(5, 1fr); }
}

.w-day {
    border-radius: 0.75rem;
    padding: 0.65rem 0.25rem;
    text-align: center;
    border: 1px solid transparent;
    animation: wFadeUp 0.3s ease forwards;
    opacity: 0;
}

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

.w-day.low    { background: #f0fdf4; border-color: #86efac; }
.w-day.medium { background: #fffbeb; border-color: #fcd34d; }
.w-day.high   { background: #fef2f2; border-color: #fca5a5; }

.w-day-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.3rem;
}

.w-day-icon {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.w-day-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    color: white;
    display: inline-block;
}

.w-day.low    .w-day-badge { background: #16a34a; }
.w-day.medium .w-day-badge { background: #d97706; }
.w-day.high   .w-day-badge { background: #dc2626; }

/* ── Legend card (right sidebar) ──────────────────────────────── */
.w-legend-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.w-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.w-legend-item strong {
    display: block;
    color: #1f2937;
}

.w-legend-item span {
    color: #6b7280;
    font-size: 0.8rem;
}

.w-legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.w-legend-item.low    .w-legend-dot { background: #16a34a; }
.w-legend-item.medium .w-legend-dot { background: #d97706; }
.w-legend-item.high   .w-legend-dot { background: #dc2626; }

/* ── Recommendation box ───────────────────────────────────────── */
.w-rec-placeholder {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    color: #9ca3af;
}

.w-rec-placeholder i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.w-rec-placeholder p {
    font-size: 0.85rem;
    line-height: 1.4;
}

.w-rec-box {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid;
}

.w-rec-box.low    { border-color: #16a34a; }
.w-rec-box.medium { border-color: #d97706; }
.w-rec-box.high   { border-color: #dc2626; }

.w-rec-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.w-rec-action {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.w-rec-action i { color: #059669; margin-top: 0.2rem; flex-shrink: 0; }

/* ── Error ────────────────────────────────────────────────────── */
.w-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    gap: 0.75rem;
    color: #374151;
}

.w-error i { font-size: 3rem; color: #dc2626; }
.w-error small { color: #9ca3af; font-size: 0.85rem; }
