/* =====================================================
   HONESTLY, E — Voyages (Esmé Travel Companion)
   Esmé's second-skin layer + voyage/moment styling
   ===================================================== */

/* Esmé brand tokens */
:root {
    --esme-olive: #5C6B4D;
    --esme-olive-deep: #4A5740;
    --esme-olive-light: #7A8B6A;
    --esme-gold: #C9A227;
    --esme-gold-light: #D4B84A;
    --esme-terracotta: #C17F59;
    --esme-cream: #FAF7F0;
    --esme-stripe: linear-gradient(
        180deg,
        #5C6B4D 0%,
        #7A8B6A 25%,
        #C9A227 50%,
        #C17F59 75%,
        #5C6B4D 100%
    );
}

/* -----------------------------------------------------
   Olive/Gold Stripe — Esmé's signature (right edge)
   ----------------------------------------------------- */
.esme-active::after {
    content: '';
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--esme-stripe);
    z-index: 9999;
    pointer-events: none;
}

/* Prevent both stripes from showing */
.esme-active.emory-active::after {
    background: var(--esme-stripe);
}

/* -----------------------------------------------------
   Voyages Panel — replaces timeline when Esmé active
   ----------------------------------------------------- */
.voyages-panel {
    display: none;
    width: var(--timeline-width, 280px);
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow: hidden;
}

.esme-active .voyages-panel {
    display: flex;
}

.esme-active .timeline-sidebar {
    display: none;
}

.esme-active .timeline-fab {
    display: none !important;
}

/* Also hide storylines panel if Emory was active before */
.esme-active .storylines-panel {
    display: none !important;
}

/* -----------------------------------------------------
   Voyages Panel Header
   ----------------------------------------------------- */
.voyages-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voyages-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
}

.voyages-add-btn {
    background: none;
    border: 1px solid var(--esme-olive);
    color: var(--esme-olive);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voyages-add-btn:hover {
    background: var(--esme-olive);
    color: white;
}

/* -----------------------------------------------------
   Voyages List
   ----------------------------------------------------- */
.voyages-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

/* Empty state */
.voyages-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.voyages-empty-icon {
    margin-bottom: 0.75rem;
    opacity: 0.4;
    color: var(--esme-olive);
}

.voyages-empty-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.voyages-empty-text {
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Voyage cards */
.voyage-card {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
}

.voyage-card:hover {
    background: var(--bg-hover);
}

.voyage-card.active {
    background: var(--esme-cream);
    border-color: var(--esme-olive-light);
}

.voyage-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.voyage-card-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
}

.voyage-card-destination {
    font-size: 0.8rem;
    color: var(--esme-olive);
    margin-top: 0.2rem;
    font-style: italic;
}

.voyage-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voyage-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Status badges */
.voyage-status-badge {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    white-space: nowrap;
}

.vstatus-dreaming { background: #F0EDE8; color: #8B7B6B; }
.vstatus-planning { background: #E8EFE3; color: var(--esme-olive-deep); }
.vstatus-active { background: #FFF8E1; color: #8B6914; }
.vstatus-lived { background: #FAEEE7; color: var(--esme-terracotta); }
.vstatus-treasured { background: #F5F0E0; color: var(--esme-gold); }

.voyage-meta-dates {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.voyage-meta-moments {
    color: var(--text-muted);
}

/* -----------------------------------------------------
   Voyage Detail View
   ----------------------------------------------------- */
.voyage-detail-header {
    padding: 0 0 0.75rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.75rem;
}

.voyage-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--esme-olive);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast);
}

.voyage-back-btn:hover {
    color: var(--esme-olive-deep);
}

.voyage-detail-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.2rem 0;
}

.voyage-detail-destination {
    font-size: 0.85rem;
    color: var(--esme-olive);
    font-style: italic;
    margin-bottom: 0.3rem;
}

.voyage-detail-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.voyage-detail-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

/* -----------------------------------------------------
   Moments List
   ----------------------------------------------------- */
.moments-section {
    flex: 1;
}

.moments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.moments-count {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.moments-add-btn {
    background: none;
    border: none;
    color: var(--esme-olive);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.moments-add-btn:hover {
    background: var(--bg-hover);
    color: var(--esme-olive-deep);
}

.moments-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Moment cards */
.moment-card {
    display: flex;
    gap: 0.6rem;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.moment-card:hover {
    background: var(--bg-hover);
}

.moment-card-left {
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.moment-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.moment-status-dot.mstatus-dreaming { background: transparent; border-color: #8B7B6B; }
.moment-status-dot.mstatus-planned { background: #E8EFE3; border-color: var(--esme-olive); }
.moment-status-dot.mstatus-lived { background: #FAEEE7; border-color: var(--esme-terracotta); }
.moment-status-dot.mstatus-treasured { background: #F5F0E0; border-color: var(--esme-gold); }

.moment-card-content {
    flex: 1;
    min-width: 0;
}

.moment-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
}

.moment-card-label {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.moment-type-badge {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    padding: 0.1rem 0.3rem;
    background: var(--bg-secondary);
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.moment-card-location {
    font-size: 0.75rem;
    color: var(--esme-olive);
    margin-top: 0.15rem;
    font-style: italic;
}

.moment-card-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.moment-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.moment-date-label {
    color: var(--text-muted);
}

.moment-entry-count {
    color: var(--esme-olive);
}

/* -----------------------------------------------------
   Add Moment Form (inline)
   ----------------------------------------------------- */
.moment-add-form {
    padding: 0.6rem;
    background: var(--esme-cream);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-light);
}

.moment-add-input,
.moment-add-location {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-serif);
    font-size: 0.9rem;
    background: var(--bg-card);
    color: var(--text-primary);
    box-sizing: border-box;
}

.moment-add-input:focus,
.moment-add-location:focus {
    outline: none;
    border-color: var(--esme-olive);
}

.moment-add-row {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.moment-add-location {
    flex: 1;
    font-size: 0.85rem;
}

.moment-add-select {
    width: auto;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    background: var(--bg-card);
    color: var(--text-primary);
}

.moment-add-options {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.moment-add-save, .moment-add-cancel {
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

.moment-add-save {
    background: var(--esme-olive);
    color: white;
}

.moment-add-save:hover {
    background: var(--esme-olive-deep);
}

.moment-add-cancel {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}

.moment-add-cancel:hover {
    background: var(--bg-hover);
}

/* -----------------------------------------------------
   Mobile: hide voyages panel, show as drawer
   ----------------------------------------------------- */
@media (max-width: 1024px) {
    .voyages-panel {
        display: none !important;
    }

    .esme-active .voyages-fab {
        display: flex;
    }
}

/* Voyages FAB (mobile, Esmé-only) */
.voyages-fab {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: var(--esme-olive);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(92, 107, 77, 0.3);
    z-index: 100;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.voyages-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(92, 107, 77, 0.4);
}

/* Voyages Drawer (mobile) */
.voyages-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 200;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.voyages-drawer.active {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .voyages-drawer {
        display: block;
    }
}

.voyages-drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 0.75rem auto;
}

.voyages-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.voyages-drawer-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.voyages-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.voyages-drawer-content {
    padding: 1rem 1.25rem 2rem;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* =====================================================
   VOYAGE MOMENT TILE — Center column card (Esmé feed)
   ===================================================== */

.voyage-moment-tile {
    display: flex;
    background: var(--bg-card, #fff);
    border: 1px solid rgba(92, 107, 77, 0.2);
    border-radius: 12px;
    overflow: hidden;
    cursor: default;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 0.75rem;
}

.voyage-moment-tile:hover {
    border-color: var(--esme-gold);
    box-shadow: 0 2px 8px rgba(92, 107, 77, 0.1);
}

.voyage-moment-tile-accent {
    width: 4px;
    background: var(--esme-stripe);
    flex-shrink: 0;
}

.voyage-moment-tile-body {
    padding: 1rem 1.25rem;
    flex: 1;
    min-width: 0;
}

.voyage-moment-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.voyage-moment-tile-type {
    font-size: 11px;
    font-family: var(--font-sans, sans-serif);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--esme-olive);
}

.voyage-moment-tile-date {
    font-size: 12px;
    color: var(--text-muted, #8B8279);
    font-family: var(--font-sans, sans-serif);
}

.voyage-moment-tile-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #2C2420);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.voyage-moment-tile-location {
    font-size: 13px;
    color: var(--esme-olive-light);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.voyage-moment-tile-notes {
    font-size: 14px;
    color: var(--text-secondary, #5C534A);
    line-height: 1.5;
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voyage-moment-tile-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 12px;
    font-family: var(--font-sans, sans-serif);
}

.voyage-moment-tile-status {
    color: var(--esme-olive);
}

.voyage-moment-tile-links {
    color: var(--text-muted, #8B8279);
}
