/* 
 * pages.css - MeinTango
 * Seitenspezifische Stylings und komplexe UI-Interaktionen
 */

/* Home Page (Hero Section) */
.home-hero {
    text-align: center;
    padding: var(--space-xxl) 0;
}

.home-hero h1 {
    font-size: 4rem;
    margin-bottom: var(--space-xs);
}

.home-tagline {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: var(--space-xl);
}

.home-card {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.home-card h2 {
    font-style: normal;
    color: var(--text-color);
}

.home-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
    margin-top: var(--space-l);
}

.home-actions .btn-alt {
    background-color: var(--accent-gold);
}

/* Event List Styles */
.event-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-m);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: var(--space-m);
}

.event-list-title {
    margin-bottom: 0;
    border-bottom: none;
    font-size: 1.25rem;
    font-family: 'Noto Serif', serif;
    font-style: italic;
    color: var(--primary-red);
}

.quick-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-lg);
    gap: 2px;
}

.toggle-item {
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius-lg) - 2px);
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-item .count {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.toggle-item:hover {
    color: var(--primary-red);
}

.toggle-item.active {
    background: var(--white);
    color: var(--primary-red);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toggle-item.active .count {
    background: var(--primary-red);
    color: var(--white);
}

@media (max-width: 768px) {
    .event-view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-s);
    }
    
    .quick-toggle {
        width: 100%;
        display: flex;
    }
    
    .toggle-item {
        flex: 1;
        justify-content: center;
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
}

.event-card {
    position: relative;
    border-left: 5px solid var(--primary-red);
}

.event-card.visited { border-left-color: #28a745; }
.event-card.missed { border-left-color: #dc3545; }
.event-card.planned { border-left-color: var(--primary-red); }
.event-card.past { opacity: 0.8; }

.event-date {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.event-status-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    margin-top: var(--space-xs);
    font-weight: 600;
}

.status-planned { background: #e0f2fe; color: #0369a1; }
.status-visited { background: #dcfce7; color: #15803d; }
.status-missed { background: #fee2e2; color: #b91c1c; }

/* Detail Views & Utility Classes */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-view .meta-item {
    margin-bottom: 1.5rem;
}

.detail-view .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.detail-view .content {
    font-size: 1.1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Partner & Photo Styles */
.profile-photo {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.photo-placeholder {
    width: 250px;
    height: 250px;
    background: #f0f0f0;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #999;
    border: 2px dashed #ddd;
}

/* Danger Zone */
.danger-zone {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.danger-zone h2 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.danger-zone p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: #888;
}

/* Mobile Encounter Optimization (Phase 5.5) */

/* Accordion Day Groups */
.hub-accordion-day {
    border: 1px solid #eee;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--white);
}

.hub-accordion-header {
    width: 100%;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
    border: none;
    cursor: pointer;
    text-align: left;
}

.hub-accordion-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.hub-accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--accent-gold);
}

.hub-accordion-day.active .hub-accordion-icon {
    transform: rotate(180deg);
}

.hub-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.2rem;
}

.hub-accordion-day.active .hub-accordion-content {
    max-height: 2000px;
    padding: 1rem 1.2rem;
}

/* Encounter Chips */
.encounter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.encounter-chip {
    padding: 0.5rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.encounter-chip.dancer-uwe {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    color: #0d47a1;
}

.encounter-chip.dancer-gabi {
    background-color: #fce4ec;
    border-color: #f8bbd0;
    color: #880e4f;
}

/* Bottom Sheet */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    padding: 0; /* Padding moved to header/body */
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 2;
}

.bottom-sheet-header h2 {
    margin: 0;
    font-family: 'Noto Serif', serif;
    font-size: 1.6rem;
    color: var(--primary-red);
    line-height: 1.2;
}

.sheet-subtitle {
    margin: 0.2rem 0 0 0;
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.bottom-sheet-body {
    padding: 1.5rem 2rem;
}

.sheet-content-item {
    margin-bottom: 1.5rem;
}

.sheet-content-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
}

.sheet-content-item p {
    font-family: 'Noto Serif', serif;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
}

.bottom-sheet .form-actions {
    padding: 1.5rem 2rem 2.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 1rem;
    background: #f8fafc;
}

.bottom-sheet .btn {
    flex: 1;
    justify-content: center;
    padding: 0.8rem;
    font-size: 1rem;
}

/* Close button (removed from HTML, but keeping style for safety or alternatives) */
.close-sheet {
    display: none;
}

/* YouTube Link specific in sheet */
.sheet-youtube-thumb {
    margin-top: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
}

.sheet-youtube-thumb img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.sheet-youtube-thumb:hover img {
    transform: scale(1.02);
}

@media (max-width: 600px) {
    .detail-photo {
        order: -1;
        display: flex;
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .photo-placeholder, .profile-photo {
        width: 150px;
        height: 150px;
    }
}

@media (min-width: 769px) {
    .bottom-sheet {
        max-width: 500px;
        left: 50%;
        margin-left: -250px;
        border-radius: 1.5rem;
        bottom: 2rem;
    }
}

/* Event Hub Specific Styles (Refactored from view.php) */
.section-header-accent {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}
.section-header-accent span { font-style: normal; font-size: 1.2rem; }

.section-notes { border-color: #3b82f6; }
.section-encounters { border-color: var(--primary-red); }
.section-timeline { border-color: #64748b; }
.section-logistics { border-color: var(--accent-gold); }
.section-figures { border-color: #10b981; }
.section-video { border-color: #ef4444; }

/* Video Hub Styles */
.hub-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.hub-video-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hub-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.hub-video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.hub-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    opacity: 0.8;
}
.hub-video-info {
    padding: 0.6rem;
}
.hub-video-info h4 {
    margin: 0 0 0.2rem 0;
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hub-video-meta {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

/* Sidebar Design */
.event-sidebar-card {
    border-top: 4px solid var(--accent-gold);
    padding: 1.5rem;
}
.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}
.sidebar-info-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.sidebar-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 0.2rem;
    letter-spacing: 0.05em;
}
.sidebar-value {
    font-family: 'Noto Serif', serif;
    font-size: 1.05rem;
    color: var(--text-color);
    margin: 0;
}
.energy-section {
    background: #fffcf5;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #fff3d0;
    margin-top: 0.5rem;
}
.stars-display {
    color: #ffc107;
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
}
.star { color: #ddd; }
.star.filled { color: #ffc107; }
.sidebar-mood-notes {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.4;
}

/* POI Hub Styles */
.pois-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.poi-card-mini {
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
}
.poi-header-hub {
    margin-bottom: 0.5rem;
}
.poi-name-hub {
    margin: 0 0 0.2rem 0 !important;
    font-size: 1.1rem !important;
}
.poi-meta-hub {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.poi-meta-notes {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-top: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #eee;
}

/* Timeline Styles */
.timeline { position: relative; padding-left: 1rem; margin-left: 7rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0; width: 2px; background: #eee; }
.timeline-item { position: relative; margin-bottom: 1.5rem; padding-left: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: 0.2rem; top: 0.3rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: #fff; border: 2px solid var(--primary-red); z-index: 1; }
.timeline-time { position: absolute; left: -7.5rem; width: 7rem; text-align: right; top: 0.2rem; }
.timeline-time .date { display: block; font-weight: bold; font-size: 0.85rem; color: #334155; margin-bottom: 2px; }
.timeline-time .start { display: block; font-size: 0.75rem; color: #64748b; font-weight: normal; }
.timeline-content { background: #f9f9f9; padding: 0.8rem; border-radius: 6px; border: 1px solid #eee; }

/* Figure Styles */
.figures-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.figure-item-mini { display: flex; align-items: flex-start; gap: 0.8rem; background: #f9f9f9; padding: 0.8rem; border-radius: 6px; border: 1px solid #eee; }
.status-indicator { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-top: 0.3rem; }
.status-indicator.status-understood { background-color: #10b981; }
.status-indicator.status-working_on { background-color: #f59e0b; }
.status-indicator.status-needs_review { background-color: #ef4444; }

.view-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .view-grid { grid-template-columns: 1fr; } }
.detail-section { margin-bottom: 2rem; }
.detail-section h2 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--primary-color); border-bottom: 1px solid var(--border-color); padding-bottom: 0.3rem; }

/* Hub Accordion Global Styles */
.hub-accordion-section {
    border: 1px solid #eee;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: var(--white);
}

.hub-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.hub-accordion-header:hover {
    background: #f1f5f9;
}

.hub-accordion-header h2, 
.hub-accordion-header h3 {
    margin: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    font-size: 1.1rem !important;
}

.hub-accordion-section.active .hub-accordion-icon,
.hub-accordion-day.active .hub-accordion-icon {
    transform: rotate(180deg);
}

.hub-accordion-section .hub-accordion-content,
.hub-accordion-day .hub-accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.3s ease,
                opacity 0.3s ease;
}

.hub-accordion-section.active .hub-accordion-content,
.hub-accordion-day.active .hub-accordion-content {
    max-height: 5000px;
    padding: 1.25rem;
    opacity: 1;
    border-top: 1px solid #eee;
}

.hub-accordion-section.active .hub-accordion-header {
    background: var(--white);
    border-bottom: 1px solid #eee;
}

/* Partner Diary Entries (Phase 4 Cleanup) */
.dancer-info {
    font-size: 0.85rem;
    color: #64748b;
}

.diary-section {
    margin-top: 3rem;
}

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

.diary-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.diary-entry {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-red);
    background: var(--white);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.entry-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.entry-meta .date {
    font-weight: bold;
    color: var(--primary-red);
}

.tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #f0f0f0;
    font-weight: 600;
}

.event-tag {
    background: #fee2e2;
    color: #991b1b;
}

.dj-tag {
    background: #fef3c7;
    color: #92400e;
}

.teacher-tag {
    background: #e0f2fe;
    color: #0369a1;
}

.mood-vibe {
    font-style: italic;
    color: #b45309;
}

.entry-content {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: var(--text-color);
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
    align-items: center;
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.edit-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.edit-link:hover {
    text-decoration: underline;
}

.sep {
    color: #e2e8f0;
}

.delete-link {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    font-family: inherit;
}

.delete-link:hover {
    text-decoration: underline;
}

/* Event POI Selection (Phase 4 Cleanup) */
.poi-selection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.poi-selection-item {
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.poi-selection-item:hover {
    border-color: var(--primary-red);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.poi-selection-item.linked {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.poi-info h3 {
    margin: 0 0 0.2rem 0;
    font-size: 1.15rem;
    color: var(--primary-red);
}

.poi-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.poi-selection-item textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.6rem;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.poi-selection-item textarea:focus {
    border-color: var(--primary-red);
    outline: none;
}

.no-results-card {
    text-align: center;
    padding: 2.5rem;
    background: var(--white);
    border: 2px dashed #e2e8f0;
    color: #64748b;
    border-radius: var(--radius-lg);
}

.sticky-footer {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    z-index: 10;
}
