/* ============================================================
   ZodiacTales — Daily Energy Snippet CSS
   Prefix: de-  (daily energy)
   Two-column layout where content allows, readable sizes
   ============================================================ */

@keyframes deFadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes deSoftPulse {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.12; }
}
@keyframes deBreathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,197,71,0); }
    50% { box-shadow: 0 0 12px 3px rgba(232,197,71,0.06); }
}
@keyframes deBarGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}
@keyframes deFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.daily-energy-mount { margin-top: 8px; }


/* ── CARD WRAPPER ── */

.de-card {
    background: #12121e;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 3px solid #E8C547;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    /* NO overflow:hidden — tooltip must be able to escape */
    animation: deFadeSlideIn 0.5s ease;
}
.de-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 80px;
    background: linear-gradient(180deg, rgba(232,197,71,0.06), transparent);
    pointer-events: none;
    animation: deSoftPulse 4s ease-in-out infinite;
    border-radius: 16px 16px 0 0;
}


/* ── HEADER ── */

.de-hero { position: relative; margin-bottom: 16px; }
.de-hero-top { text-align: center; margin-bottom: 12px; }
.de-hero-date {
    display: block; font-size: 0.7rem; color: rgba(255,255,255,0.35);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px;
}
.de-hero-title { font-size: 1.2rem; font-weight: 700; color: #fff; margin: 0; }


/* ── TOP SECTION: 2-column (tier+bar left, signals right) ── */

.de-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: start;
}

.de-top-left {}
.de-top-right {}

/* Tier */
.de-tier {
    display: flex; align-items: center; gap: 12px;
    background: rgba(232,197,71,0.04); border: 1px solid rgba(232,197,71,0.08);
    border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
    animation: deBreathe 4s ease-in-out infinite;
}
.de-tier-icon { font-size: 1.6rem; line-height: 1; }
.de-tier-info { display: flex; flex-direction: column; }
.de-tier-label { font-size: 0.95rem; font-weight: 700; }
.de-tier-desc { font-size: 0.78rem; color: rgba(255,255,255,0.45); }

/* Energy bar */
.de-energy-hover { position: relative; }
.de-energy-row { display: flex; align-items: center; gap: 3px; margin-bottom: 4px; }
.de-energy-seg { flex: 1; height: 10px; border-radius: 3px; background: rgba(255,255,255,0.05); }
.de-energy-seg--filled { animation: deFadeSlideIn 0.3s ease both; }
.de-energy-score { margin-left: 10px; font-size: 1.15rem; font-weight: 700; flex-shrink: 0; cursor: help; }
.de-energy-hint { font-size: 0.6rem; opacity: 0.35; margin-left: 2px; }

/* Tier legend tooltip */
.de-tier-legend {
    display: none; position: absolute;
    top: calc(100% + 8px); left: 0; right: 0;
    background: #1a1a2e; border: 1px solid rgba(232,197,71,0.18);
    border-radius: 12px; padding: 14px 16px; z-index: 50;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: deFadeSlideIn 0.2s ease;
}
.de-energy-hover:hover .de-tier-legend { display: block; }
.de-energy-hover:focus-within .de-tier-legend { display: block; }

.de-tier-legend-title {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4); margin-bottom: 10px; font-weight: 600;
}
.de-tier-legend-row {
    display: grid; grid-template-columns: 1.4em 4.5em 4em 1fr;
    gap: 6px; align-items: center; padding: 4px 6px; border-radius: 5px;
    margin-bottom: 2px; font-size: 0.8rem;
}
.de-tier-legend-row--active {
    background: rgba(232,197,71,0.08);
    border: 1px solid rgba(232,197,71,0.15);
}
.de-tier-legend-icon { font-size: 0.85rem; text-align: center; }
.de-tier-legend-label { font-weight: 700; }
.de-tier-legend-range { font-size: 0.7rem; color: rgba(255,255,255,0.35); }
.de-tier-legend-desc { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.de-tier-legend-note {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.68rem; color: rgba(255,255,255,0.3); line-height: 1.4;
}

@media (hover: none) {
    .de-energy-score { cursor: pointer; }
    .de-energy-hover:focus-within .de-tier-legend { display: block; }
}

/* Signals (stacked in right column) */
.de-signals {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.de-signal {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 6px; border-radius: 8px;
    background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.05);
    text-align: center; animation: deFadeSlideIn 0.4s ease both;
}
.de-signal:nth-child(1) { animation-delay: 0.05s; }
.de-signal:nth-child(2) { animation-delay: 0.1s; }
.de-signal:nth-child(3) { animation-delay: 0.15s; }
.de-signal:nth-child(4) { animation-delay: 0.2s; }
.de-signal-icon { font-size: 1rem; line-height: 1; }
.de-signal-domain { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.3); }
.de-signal-label { font-size: 0.78rem; font-weight: 600; line-height: 1.2; }
.de-signal-arrow { font-size: 0.8rem; font-weight: 700; }


/* ── PILLAR ── */

.de-pillar {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.de-pillar-label {
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.25);
}
.de-pillar-hover { position: relative; display: inline-block; }
.de-pillar-value {
    font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.65);
    cursor: help; padding: 3px 8px; border-radius: 5px; transition: background 0.15s;
}
.de-pillar-value:hover { background: rgba(232,197,71,0.08); }
.de-pillar-info-icon { font-size: 0.65rem; opacity: 0.35; margin-left: 3px; }

.de-pillar-tip {
    display: none; position: absolute;
    top: calc(100% + 8px); left: 0;
    width: 340px; max-width: 90vw;
    background: #1a1a2e; border: 1px solid rgba(232,197,71,0.18);
    border-radius: 12px; padding: 16px 18px; z-index: 100;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: deFadeIn 0.15s ease;
}
.de-pillar-hover:hover .de-pillar-tip,
.de-pillar-hover:focus-within .de-pillar-tip { display: block; }
.de-pillar-tip-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; }
.de-pillar-tip p { font-size: 0.8rem; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0 0 8px; }
.de-pillar-tip p:last-child { margin-bottom: 0; }
.de-pillar-tip p strong { color: rgba(255,255,255,0.85); }

@media (hover: none) {
    .de-pillar-value { cursor: pointer; }
    .de-pillar-hover:focus-within .de-pillar-tip { display: block; }
    .de-pillar-tip { width: calc(100vw - 80px); }
}


/* ── READING ── */

.de-reading {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 18px 18px; margin-bottom: 14px;
    animation: deFadeSlideIn 0.5s ease 0.15s both;
}
.de-reading-label {
    display: block; font-size: 0.6rem; text-transform: uppercase;
    letter-spacing: 0.08em; color: rgba(255,255,255,0.35);
    margin-bottom: 8px; font-weight: 600;
}
.de-reading p { color: rgba(255,255,255,0.9); font-size: 0.92rem; line-height: 1.7; margin: 0 0 10px; }
.de-reading p:last-child { margin-bottom: 0; }
.de-reading-open { font-size: 0.95rem; color: #fff; }
.de-reading-close { color: rgba(255,255,255,0.7); font-style: italic; }


/* ── ADVICE ── */

.de-advice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.de-advice-card {
    padding: 12px 14px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05); background: rgba(255,255,255,0.02);
    animation: deFadeSlideIn 0.4s ease 0.2s both;
}
.de-advice-card--best { border-color: rgba(76,175,80,0.15); background: rgba(76,175,80,0.03); }
.de-advice-card--watch { border-color: rgba(255,152,0,0.15); background: rgba(255,152,0,0.03); }
.de-advice-icon { font-size: 0.9rem; display: block; margin-bottom: 4px; }
.de-advice-card h4 {
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4); margin: 0 0 4px;
}
.de-advice-card p { font-size: 0.85rem; line-height: 1.45; color: rgba(255,255,255,0.7); margin: 0; }


/* ── MIDDLE ROW: 2-column (compat left, chart right) ── */

.de-mid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
    align-items: start;
}


/* ── COMPATIBILITY ── */

.de-compat {}
.de-section-label {
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3); margin: 0 0 8px; font-weight: 600;
}
.de-compat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.de-compat-card {
    text-align: center; padding: 12px 8px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05); background: rgba(255,255,255,0.02);
}
.de-compat-card--best { border-color: rgba(232,197,71,0.15); }
.de-compat-card--avoid { border-color: rgba(255,82,82,0.1); }
.de-compat-badge {
    display: block; font-size: 0.55rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: rgba(255,255,255,0.3); margin-bottom: 2px;
}
.de-compat-emoji { font-size: 1.2rem; display: block; margin-bottom: 1px; }
.de-compat-card--best .de-compat-name { color: #E8C547; font-weight: 600; font-size: 0.85rem; }
.de-compat-card--avoid .de-compat-name { color: rgba(255,82,82,0.75); font-weight: 600; font-size: 0.85rem; }


/* ── WEEK CHART ── */

.de-week {}
.de-week-meta {
    display: flex; justify-content: center; gap: 14px;
    font-size: 0.65rem; color: rgba(255,255,255,0.35); margin-bottom: 8px;
}
.de-week-bars { display: flex; align-items: flex-end; gap: 5px; justify-content: center; }
.de-week-col {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    position: relative;
}
.de-week-score { font-size: 0.6rem; font-weight: 600; }
.de-week-bar {
    width: 32px; border-radius: 4px; transform-origin: bottom;
    animation: deBarGrow 0.4s ease both;
    cursor: default;
    transition: opacity 0.15s;
}
.de-week-col:nth-child(1) .de-week-bar { animation-delay: 0s; }
.de-week-col:nth-child(2) .de-week-bar { animation-delay: 0.05s; }
.de-week-col:nth-child(3) .de-week-bar { animation-delay: 0.08s; }
.de-week-col:nth-child(4) .de-week-bar { animation-delay: 0.12s; }
.de-week-col:nth-child(5) .de-week-bar { animation-delay: 0.16s; }
.de-week-col:nth-child(6) .de-week-bar { animation-delay: 0.2s; }
.de-week-col:nth-child(7) .de-week-bar { animation-delay: 0.25s; }
.de-week-day { font-size: 0.6rem; color: rgba(255,255,255,0.3); }
.de-week-day--today { color: #E8C547; font-weight: 700; }
.de-week-today-tag {
    display: block; font-size: 0.45rem; font-weight: 700; color: #E8C547;
    letter-spacing: 0.06em; text-transform: uppercase;
    margin-top: -1px;
}

/* Week bar hover tooltip */
.de-week-tip {
    display: none; position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%); white-space: nowrap;
    background: #1a1a2e; border: 1px solid rgba(232,197,71,0.18);
    border-radius: 8px; padding: 6px 10px; z-index: 50;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    font-size: 0.72rem; color: rgba(255,255,255,0.8);
    pointer-events: none;
}
.de-week-col:hover .de-week-tip { display: block; }


/* ── TRAILING DAYS (always expanded) ── */

.de-trailing { margin-bottom: 14px; }
.de-trail-day {
    border: 1px solid rgba(255,255,255,0.05); border-radius: 8px;
    margin-bottom: 6px; background: rgba(255,255,255,0.015); overflow: hidden;
}
.de-trail-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    font-size: 0.8rem; color: rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.de-trail-score { font-weight: 700; font-size: 0.82rem; min-width: 34px; }
.de-trail-label { font-weight: 500; color: rgba(255,255,255,0.6); }
.de-trail-date { font-size: 0.7rem; color: rgba(255,255,255,0.25); }
.de-trail-tier { margin-left: auto; font-size: 0.7rem; }
.de-trail-body { padding: 10px 14px 12px; }
.de-trail-body p { font-size: 0.82rem; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0 0 8px; }
.de-trail-body p:last-of-type { margin-bottom: 0; }
.de-trail-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.de-trail-sig {
    font-size: 0.7rem; padding: 3px 6px; background: rgba(255,255,255,0.025);
    border-radius: 4px; border: 1px solid rgba(255,255,255,0.04);
}


/* ── CTA ── */

.de-cta { text-align: center; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.05); }
.de-cta p { font-size: 0.78rem; color: rgba(255,255,255,0.35); margin: 0 0 8px; }
.de-cta-btn {
    display: inline-block; padding: 9px 22px; border-radius: 8px;
    background: #E8C547; color: #1a1a2e; font-size: 0.82rem; font-weight: 700;
    text-decoration: none; transition: opacity 0.2s, transform 0.15s;
}
.de-cta-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.de-cta-link { display: block; margin-top: 8px; font-size: 0.72rem; color: #E8C547; text-decoration: none; }
.de-cta-link:hover { text-decoration: underline; }


/* ── RESPONSIVE ── */

@media (max-width: 680px) {
    .de-top-row { grid-template-columns: 1fr; }
    .de-mid-row { grid-template-columns: 1fr; }
    .de-card { padding: 18px 16px; }
    .de-signals { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .de-signals { grid-template-columns: repeat(2, 1fr); }
    .de-advice { grid-template-columns: 1fr; }
    .de-week-bar { width: 24px; }
}