/*
 * bw-styles-astroenergy.css
 * Scoped under #bw-astroenergy-panel.
 * Internal palette: #4169A8 (mid-blue), #1F3B6B (deep navy), #EAF1FA (light),
 * #A8C0E0 (muted blue), #d4a857 (gold-amber) — these are intentionally
 * stable internal values independent of the Customizer palette, per plugin
 * convention for a specialised daily widget.
 * No font-family declarations — theme drives Poppins from Google Fonts.
 */

/* ── Root wrapper ── */
#bw-astroenergy-panel {
    color: #555;
    line-height: 1.7;
}

/* ── Empty state ── */
#bw-astroenergy-panel .as-empty {
    background: #fafbff;
    border: 1px solid #e8edf8;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

#bw-astroenergy-panel .as-empty-h {
    font-size: 1.5rem;
    font-weight: 700;
    color: #444;
    margin: 0 0 0.65rem;
}

#bw-astroenergy-panel .as-empty-p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0 auto 1.5rem;
    max-width: 520px;
}

#bw-astroenergy-panel .as-empty-note {
    font-size: 0.78rem;
    color: #999;
    margin: 1rem 0 0;
}

#bw-astroenergy-panel .as-empty-line {
    font-style: italic;
    color: #888;
    margin: 0;
    font-size: 0.92rem;
}

/* ── Buttons ── */
#bw-astroenergy-panel .as-btn,
#bw-astroenergy-panel .as-btn-secondary {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
    text-decoration: none;
}

#bw-astroenergy-panel .as-btn {
    background: #4169A8;
    color: #fff;
    border: 1px solid #4169A8;
}

#bw-astroenergy-panel .as-btn:hover {
    background: #305090;
    border-color: #305090;
    opacity: 1;
}

#bw-astroenergy-panel .as-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#bw-astroenergy-panel .as-btn-secondary {
    background: #fff;
    color: #4169A8;
    border: 1px solid #d0dcf0;
}

#bw-astroenergy-panel .as-btn-secondary:hover {
    border-color: #4169A8;
    background: #f5f7fb;
    opacity: 1;
}

/* ── Big Three chip bar ── */
#bw-astroenergy-panel .as-bar {
    background: #fafbff;
    border: 1px solid #e8edf8;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

#bw-astroenergy-panel .as-bar-h {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4169A8;
    margin: 0 0 0.65rem;
}

#bw-astroenergy-panel .as-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

#bw-astroenergy-panel .as-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #d0dcf0;
    border-radius: 999px;
    font-size: 0.82rem;
}

#bw-astroenergy-panel .as-chip-l {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#bw-astroenergy-panel .as-chip-v {
    font-weight: 700;
    color: #444;
    font-style: normal;
}

#bw-astroenergy-panel .as-chip-g {
    color: #4169A8;
    font-size: 0.95rem;
    font-family: "DejaVu Sans", "Segoe UI Symbol", "Apple Symbols", "Symbola", sans-serif;
    font-variant-emoji: text;
}

#bw-astroenergy-panel .as-chip-edit {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: #4169A8;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 6px 10px;
    text-decoration: none;
}

#bw-astroenergy-panel .as-chip-edit:hover {
    opacity: 0.7;
}

#bw-astroenergy-panel .as-chip--note {
    background: #f5f7fb;
    border-style: dashed;
    border-color: #d0dcf0;
    cursor: help;
}

#bw-astroenergy-panel .as-chip--note .as-chip-v {
    color: #888;
    font-style: italic;
    font-weight: 400;
}

/* ── Hero ── */
#bw-astroenergy-panel .as-hero {
    background: #1F3B6B;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: center;
}

#bw-astroenergy-panel .as-ring-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#bw-astroenergy-panel .as-ring-l {
    font-size: 0.7rem;
    color: #A8C0E0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
}

#bw-astroenergy-panel .as-hero-eyebrow {
    font-size: 0.72rem;
    color: #A8C0E0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 4px;
}

#bw-astroenergy-panel .as-hero-h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #EAF1FA;
    margin: 0 0 14px;
    line-height: 1.3;
}

#bw-astroenergy-panel .as-hero-ts {
    font-size: 0.72rem;
    color: #A8C0E0;
    margin: 0;
}

/* ── Two-col: influences + tone ── */
#bw-astroenergy-panel .as-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

#bw-astroenergy-panel .as-card {
    background: #fff;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    padding: 1.1rem 1.35rem;
}

#bw-astroenergy-panel .as-card-h {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4169A8;
    margin: 0 0 0.85rem;
}

#bw-astroenergy-panel .as-inf {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 0.75rem 0;
    border-top: 1px solid #f0f4fb;
}

#bw-astroenergy-panel .as-inf:first-of-type {
    border-top: 0;
    padding-top: 0;
}

#bw-astroenergy-panel .as-inf-glyph {
    font-size: 1.05rem;
    color: #4169A8;
    line-height: 1.6;
    text-align: center;
    font-family: "DejaVu Sans", "Segoe UI Symbol", "Apple Symbols", "Symbola", sans-serif;
    font-variant-emoji: text;
}

#bw-astroenergy-panel .as-inf-meta {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.45;
    margin: 0;
}

#bw-astroenergy-panel .as-inf-meta b {
    font-weight: 700;
}

#bw-astroenergy-panel .as-inf-sub {
    font-size: 0.8rem;
    color: #888;
    margin: 3px 0 0;
    line-height: 1.5;
}

#bw-astroenergy-panel .as-pill {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

#bw-astroenergy-panel .as-pill--h {
    background: #f0f4fb;
    color: #4169A8;
    border: 1px solid #d0dcf0;
}

#bw-astroenergy-panel .as-pill--t {
    background: #fdf6e8;
    color: #a07820;
    border: 1px solid #e0c870;
}

#bw-astroenergy-panel .as-pill--n {
    background: #f5f7fb;
    color: #666;
    border: 1px solid #e0e6f0;
}

/* Tone column */
#bw-astroenergy-panel .as-tone {
    font-size: 0.95rem;
    font-style: italic;
    color: #444;
    line-height: 1.65;
    margin: 0 0 0.85rem;
}

#bw-astroenergy-panel .as-tone-q {
    font-size: 0.78rem;
    color: #888;
    margin: 0;
    line-height: 1.55;
}

/* Do / Avoid */
#bw-astroenergy-panel .as-da {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

#bw-astroenergy-panel .as-da-card {
    background: #fff;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    border-left-width: 4px;
    border-left-style: solid;
}

#bw-astroenergy-panel .as-da-card--do {
    border-left-color: #4169A8;
    border-radius: 0 10px 10px 0;
}

#bw-astroenergy-panel .as-da-card--avoid {
    border-left-color: #d4a857;
    border-radius: 0 10px 10px 0;
}

#bw-astroenergy-panel .as-da-h {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.65rem;
}

#bw-astroenergy-panel .as-da-card--do .as-da-h {
    color: #4169A8;
}

#bw-astroenergy-panel .as-da-card--avoid .as-da-h {
    color: #a07820;
}

#bw-astroenergy-panel .as-da-list {
    margin: 0;
    padding-left: 1.1rem;
}

#bw-astroenergy-panel .as-da-list li {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

#bw-astroenergy-panel .as-da-list li:last-child {
    margin-bottom: 0;
}

/* Timing strip */
#bw-astroenergy-panel .as-time {
    background: #fafbff;
    border: 1px solid #e8edf8;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

#bw-astroenergy-panel .as-time-h {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4169A8;
    margin: 0 0 0.85rem;
}

#bw-astroenergy-panel .as-time-svg {
    width: 100%;
    display: block;
}

#bw-astroenergy-panel .as-time-legend {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.65rem;
    font-size: 0.72rem;
    color: #888;
    flex-wrap: wrap;
}

#bw-astroenergy-panel .as-time-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#bw-astroenergy-panel .as-time-legend i {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    display: inline-block;
}

/* ── Lore ── */
#bw-astroenergy-panel .as-lore {
    border-top: 1px solid #e8edf8;
    padding-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 2rem;
}

#bw-astroenergy-panel .as-lore-block strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 0.4rem;
}

#bw-astroenergy-panel .as-lore-block p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* ── Disclaimer ── */
#bw-astroenergy-panel .as-disclaimer {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.6;
    margin: 0;
}

#bw-astroenergy-panel .as-error {
    background: #fdf6e8;
    border-left: 4px solid #d4a857;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

#bw-astroenergy-panel .as-error p {
    font-size: 0.9rem;
    color: #6b5320;
    margin: 0;
}

/* ── Modal ── */
#bw-astroenergy-panel .as-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#bw-astroenergy-panel .as-modal.is-open {
    display: flex;
}

#bw-astroenergy-panel .as-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 59, 107, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: pointer;
}

#bw-astroenergy-panel .as-modal-panel {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 2rem 2.25rem 2.25rem;
    box-shadow: 0 24px 60px rgba(31, 59, 107, 0.35);
}

#bw-astroenergy-panel .as-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    background: transparent;
    border: 0;
    font-size: 1.6rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

#bw-astroenergy-panel .as-modal-close:hover {
    color: #444;
    background: #f5f7fb;
}

#bw-astroenergy-panel .as-modal-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4169A8;
    margin: 0 0 0.4rem;
}

#bw-astroenergy-panel .as-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #444;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

#bw-astroenergy-panel .as-modal-intro {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* Form */
#bw-astroenergy-panel .as-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#bw-astroenergy-panel .as-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#bw-astroenergy-panel .as-field label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #444;
}

#bw-astroenergy-panel .as-field-hint {
    font-size: 0.72rem;
    color: #888;
    font-weight: 400;
    margin: 0.35rem 0 0;
    line-height: 1.5;
}

#bw-astroenergy-panel .as-field input[type="date"],
#bw-astroenergy-panel .as-field input[type="time"],
#bw-astroenergy-panel .as-field input[type="text"],
#bw-astroenergy-panel .as-field input[type="number"],
#bw-astroenergy-panel .as-field select {
    padding: 0.55rem 0.7rem;
    font-size: max(16px, 0.92rem); /* iOS auto-zoom prevention */
    border: 1px solid #d0dcf0;
    border-radius: 6px;
    background: #fff;
    color: #444;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

#bw-astroenergy-panel .as-field input:focus,
#bw-astroenergy-panel .as-field select:focus {
    outline: none;
    border-color: #4169A8;
    box-shadow: 0 0 0 3px rgba(65, 105, 168, 0.15);
}

#bw-astroenergy-panel .as-field input:disabled {
    background: #f5f7fb;
    color: #888;
    cursor: not-allowed;
}

#bw-astroenergy-panel .as-time-unknown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
    font-size: 0.82rem;
    color: #555;
    font-weight: 400;
    cursor: pointer;
}

#bw-astroenergy-panel .as-time-unknown input[type="checkbox"] {
    accent-color: #4169A8;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

#bw-astroenergy-panel .as-time-unknown:hover {
    color: #4169A8;
}

#bw-astroenergy-panel .as-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

/* Typeahead */
#bw-astroenergy-panel .as-field--place {
    position: relative;
}

#bw-astroenergy-panel .as-typeahead {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #d0dcf0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(31, 59, 107, 0.12);
    z-index: 10;
    max-height: 240px;
    overflow-y: auto;
}

#bw-astroenergy-panel .as-ta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #f0f4fb;
    padding: 0.65rem 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}

#bw-astroenergy-panel .as-ta-item:last-child {
    border-bottom: 0;
}

#bw-astroenergy-panel .as-ta-item:hover,
#bw-astroenergy-panel .as-ta-item.is-active {
    background: #f5f7fb;
}

#bw-astroenergy-panel .as-ta-name {
    font-size: 0.92rem;
    font-weight: 500;
    color: #444;
    line-height: 1.3;
}

#bw-astroenergy-panel .as-ta-meta {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.3;
    margin-top: 2px;
}

#bw-astroenergy-panel .as-ta-empty {
    padding: 0.85rem;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    text-align: center;
}

#bw-astroenergy-panel .as-form-error {
    background: #fdf6e8;
    border-left: 4px solid #d4a857;
    border-radius: 0 6px 6px 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    color: #6b5320;
    margin: 0;
}

#bw-astroenergy-panel .as-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* ── Mobile ≤ 768px ── */
@media (max-width: 768px) {
    #bw-astroenergy-panel .as-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #bw-astroenergy-panel .as-ring-wrap {
        margin: 0 auto;
    }

    #bw-astroenergy-panel .as-2,
    #bw-astroenergy-panel .as-da,
    #bw-astroenergy-panel .as-lore {
        grid-template-columns: 1fr;
    }

    #bw-astroenergy-panel .as-modal-panel {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    #bw-astroenergy-panel .as-modal-title {
        font-size: 1.3rem;
    }

    #bw-astroenergy-panel .as-field-row {
        grid-template-columns: 1fr;
    }

    #bw-astroenergy-panel .as-chips {
        flex-direction: column;
        align-items: flex-start;
    }

    #bw-astroenergy-panel .as-chip-edit {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    #bw-astroenergy-panel .as-empty {
        padding: 1.5rem 1.25rem;
    }

    #bw-astroenergy-panel .as-empty-h {
        font-size: 1.25rem;
    }

    #bw-astroenergy-panel .as-form-actions {
        flex-direction: column-reverse;
    }

    #bw-astroenergy-panel .as-form-actions button {
        width: 100%;
    }
}
