/* =============================================
   RIGHT-PANEL.CSS - Right Sidebar Event Details Panel
   Slides in from right when event is clicked
   ============================================= */

/* =============================================
   PANEL CONTAINER
   ============================================= */

.right-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: var(--right-panel-width);
    background: var(--white);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out);
}

.right-panel.open {
    transform: translateX(0);
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: var(--white);
    flex-shrink: 0;
}

.panel-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--charcoal);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.panel-close-btn:hover {
    background: var(--cream);
    color: var(--ink);
}

.panel-close-btn svg {
    width: 20px;
    height: 20px;
}

.panel-actions {
    display: flex;
    gap: var(--space-1);
}

.panel-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--charcoal);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.panel-action-btn:hover {
    background: var(--cream);
    color: var(--ink);
}

.panel-action-btn.delete:hover {
    background: var(--phase-menstrual-light);
    color: var(--phase-menstrual);
}

.panel-action-btn svg {
    width: 18px;
    height: 18px;
}

/* =============================================
   PANEL CONTENT
   ============================================= */

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
}

/* Event Title */
.event-title-section {
    margin-bottom: var(--space-6);
}

.event-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
}

.event-color-indicator.coral { background: var(--coral); }
.event-color-indicator.sage { background: var(--sage); }
.event-color-indicator.lavender { background: var(--lavender); }
.event-color-indicator.honey { background: var(--honey); }

.event-title-large {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: var(--space-2);
}

/* =============================================
   EVENT DETAILS
   ============================================= */

.detail-section {
    margin-bottom: var(--space-5);
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) 0;
}

.detail-icon {
    width: 20px;
    height: 20px;
    color: var(--warm-gray);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-icon svg {
    width: 18px;
    height: 18px;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.detail-value {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.5;
}

.detail-value-secondary {
    font-size: 13px;
    color: var(--charcoal);
}

/* Time Display */
.time-display {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.time-display .separator {
    color: var(--stone);
}

.time-display .duration {
    font-size: 12px;
    color: var(--warm-gray);
    background: var(--cream);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* =============================================
   CYCLE PHASE INSIGHT CARD
   ============================================= */

.cycle-insight-card {
    background: linear-gradient(135deg, var(--phase-follicular-light) 0%, var(--phase-ovulation-light) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.cycle-insight-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.cycle-insight-icon {
    font-size: 18px;
}

.cycle-insight-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--charcoal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cycle-insight-phase {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--ink);
    margin-bottom: var(--space-1);
}

.cycle-insight-cycle-day {
    font-size: 12px;
    color: var(--charcoal);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.cycle-insight-description {
    font-size: 13px;
    color: var(--charcoal);
    line-height: 1.5;
}

/* Energy Level */
.energy-level {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(45, 42, 38, 0.08);
}

.energy-level-label {
    font-size: 12px;
    color: var(--charcoal);
}

.energy-bolts {
    display: flex;
    gap: 2px;
}

.energy-bolt {
    font-size: 14px;
    opacity: 0.25;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.energy-bolt.active {
    opacity: 1;
}

/* Phase-specific card backgrounds */
.cycle-insight-card.menstrual {
    background: linear-gradient(135deg, var(--phase-menstrual-light) 0%, rgba(232, 132, 124, 0.1) 100%);
}

.cycle-insight-card.follicular {
    background: linear-gradient(135deg, var(--phase-follicular-light) 0%, rgba(244, 165, 116, 0.1) 100%);
}

.cycle-insight-card.ovulation {
    background: linear-gradient(135deg, var(--phase-ovulation-light) 0%, rgba(124, 181, 160, 0.1) 100%);
}

.cycle-insight-card.luteal {
    background: linear-gradient(135deg, var(--phase-luteal-light) 0%, rgba(155, 142, 196, 0.1) 100%);
}

/* =============================================
   CALENDAR / CATEGORY
   ============================================= */

.calendar-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--cream);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--ink);
}

.calendar-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.calendar-badge-dot.coral { background: var(--coral); }
.calendar-badge-dot.sage { background: var(--sage); }
.calendar-badge-dot.lavender { background: var(--lavender); }
.calendar-badge-dot.honey { background: var(--honey); }

/* =============================================
   DESCRIPTION / NOTES
   ============================================= */

.description-section {
    border-top: 1px solid var(--border);
    padding-top: var(--space-4);
    margin-top: var(--space-4);
}

.description-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.description-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.description-edit-btn {
    font-size: 12px;
    color: var(--coral);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.description-edit-btn:hover {
    background: var(--coral-soft);
}

.description-text {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.6;
}

.description-empty {
    font-size: 14px;
    color: var(--warm-gray);
    font-style: italic;
}

/* =============================================
   PANEL FOOTER
   ============================================= */

.panel-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--space-3);
    flex-shrink: 0;
    background: var(--off-white);
}

.panel-footer .btn {
    flex: 1;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.right-panel.entering {
    animation: slideIn var(--duration-slow) var(--ease-out) forwards;
}

.right-panel.leaving {
    animation: slideOut var(--duration-normal) var(--ease-in-out) forwards;
}

/* Content fade in */
.panel-content > * {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp var(--duration-normal) var(--ease-out) forwards;
}

.right-panel.open .panel-content > *:nth-child(1) { animation-delay: 50ms; }
.right-panel.open .panel-content > *:nth-child(2) { animation-delay: 100ms; }
.right-panel.open .panel-content > *:nth-child(3) { animation-delay: 150ms; }
.right-panel.open .panel-content > *:nth-child(4) { animation-delay: 200ms; }
.right-panel.open .panel-content > *:nth-child(5) { animation-delay: 250ms; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
