/* ==========================================================================
   Kids Trip Korea - Favorites Drawer & Booking Briefing Stylesheet
   ========================================================================== */

.favorites-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.favorites-drawer-overlay.open {
    display: flex;
}

@media (min-width: 768px) {
    .favorites-drawer-overlay {
        align-items: center;
    }
}

.favorites-drawer-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 580px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: drawerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@media (min-width: 768px) {
    .favorites-drawer-content {
        border-radius: var(--radius-xl);
        max-height: 82vh;
    }
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.drawer-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border-hover);
    border-radius: var(--radius-full);
    margin: 8px auto 0 auto;
}

@media (min-width: 768px) {
    .drawer-drag-handle {
        display: none;
    }
}

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

.drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-subtitle {
    font-size: 0.75rem;
    color: var(--accent-emerald);
    margin-top: 2px;
}

/* Sort Bar */
.drawer-sort-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
}

.drawer-sort-tab {
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.2s ease;
}

.drawer-sort-tab:hover {
    color: var(--text-primary);
}

.drawer-sort-tab.active {
    background: var(--bg-card-hover);
    color: var(--accent-blue);
    font-weight: 700;
}

/* Favorites Scroll Area */
.favorites-list-scroll {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

/* Individual Favorite Briefing Card */
.fav-briefing-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fav-briefing-card:hover {
    border-color: var(--accent-emerald);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fav-card-actions {
    cursor: default;
}

.fav-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fav-place-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.fav-dday-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
}

.fav-dday-badge.urgent {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.fav-dday-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.fav-dday-badge.upcoming {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.fav-card-schedule {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fav-card-schedule strong {
    color: var(--accent-amber);
}

.fav-card-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.fav-btn-action {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s ease;
}

.fav-btn-cal {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.fav-btn-cal:hover {
    background: var(--accent-blue);
    color: #000;
}

.fav-btn-book {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.fav-btn-book:hover {
    background: var(--accent-emerald);
    color: #000;
}

.fav-btn-del {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.35rem;
    max-width: 32px;
}

.fav-btn-del:hover {
    color: var(--accent-rose);
}

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

.fav-empty-state p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Drawer Footer */
.drawer-footer {
    padding: 0.85rem 1.25rem;
    padding-bottom: calc(0.85rem + var(--safe-bottom));
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.btn-export-all-ics {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-amber), #ea580c);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px var(--accent-amber-glow);
    transition: all 0.2s ease;
}

.btn-export-all-ics:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-amber-glow);
}
