/* ============================================================================
   NOTE MEDIA — voice note + picture attachments on day NOTES (journal_entries)
   Theme: navy #0a1628 / #0f1a2e / #16223c + gold #c8a03c + white
   Scope: the rich note editor (openChipEditModal), the day-detail panel note
   block, and the calendar chip preview/indicators.
   ============================================================================ */

/* ── Note editor: media toolbar row ───────────────────────────────── */
.ce-media-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-top: 1px solid rgba(200, 160, 60, 0.18);
    background: rgba(10, 22, 40, 0.55);
}
.ce-media-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e8eef7;
    background: rgba(22, 34, 60, 0.9);
    border: 1px solid rgba(200, 160, 60, 0.35);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
/* Equal-width, centred so Voice note / Picture sit balanced across the row. */
.ce-media-row .ce-media-btn { flex: 1 1 0; justify-content: center; }
.ce-media-btn:hover { background: rgba(200, 160, 60, 0.18); border-color: #c8a03c; }
.ce-media-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.ce-media-btn.recording {
    color: #fff;
    background: rgba(193, 47, 47, 0.9);
    border-color: #c12f2f;
}
.ce-media-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.ce-rec-time {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: #c8a03c;
    min-width: 2.6rem;
}
.ce-rec-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #c12f2f;
    display: inline-block;
    animation: ceRecPulse 1s ease-in-out infinite;
}
@keyframes ceRecPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* attached media preview inside the editor */
.ce-media-attached {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0.9rem 0.6rem;
    background: rgba(10, 22, 40, 0.55);
}
.ce-media-attached:empty { display: none; padding: 0; }
.ce-attached-audio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ce-attached-audio audio { flex: 1 1 auto; height: 34px; }
.ce-attached-img-wrap { position: relative; display: inline-block; max-width: 220px; }
.ce-attached-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(200, 160, 60, 0.3);
    display: block;
}
.ce-media-remove {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    line-height: 1;
    border-radius: 50%;
    border: none;
    background: rgba(10, 22, 40, 0.85);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.ce-media-remove:hover { background: #c12f2f; }
.ce-attached-audio .ce-media-remove { position: static; flex: 0 0 auto; }

/* ── Day-detail panel: note media ──────────────────────────────── */
.ddl-note-media {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.ddl-note-media:empty { display: none; }
.ddl-note-audio { width: 100%; height: 36px; }
.ddl-note-image {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(200, 160, 60, 0.25);
    cursor: zoom-in;
    display: block;
}

/* ── Calendar chip: note preview + media indicators ────────────────── */
.cal-chip-note .cc-note-ind {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.85;
}
.cal-chip-note .cc-note-ind svg {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
}

/* note-preview snippet (also reused by the existing hover tooltip) */
.cct-note-preview {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(232, 238, 247, 0.85);
    white-space: normal;
    max-width: 240px;
}
