/**
 * Travel Gallery Styles
 * Travelogue-style layout with timeline, map, and day sections
 */

/* Header */
.travel-header {
    padding: 3rem 0 2rem;
    background: linear-gradient(to bottom, var(--bg-secondary, #f8f9fa), var(--bg-primary, #ffffff));
}

.travel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.travel-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.btn-unlock {
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-unlock:hover {
    background: var(--color-primary-hover);
}

.travel-description {
    font-size: 1.1rem;
    color: var(--text-secondary, #666);
    max-width: 700px;
    margin-bottom: 1rem;
}

.travel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary, #666);
}

.travel-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.travel-dates::before { content: "📅 "; }
.travel-days::before { content: "📆 "; }
.travel-photos::before { content: "📷 "; }
.travel-locations::before { content: "📍 "; }

/* Map Section */
.travel-map-section {
    padding: 2rem 0;
    background: var(--bg-secondary, #f8f9fa);
}

.travel-map {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Timeline */
.travel-timeline {
    padding: 2rem 0;
    background: var(--bg-primary, #ffffff);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.timeline-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary, #f3f4f6);
    border: 2px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary, #666);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    position: relative;
}

.dot-label {
    font-size: 0.6rem;
    font-weight: 500;
    line-height: 1;
    opacity: 0.8;
}

.timeline-dot:hover {
    background: var(--primary-color, #3b82f6);
    border-color: var(--primary-color, #3b82f6);
    color: #fff;
    transform: scale(1.1);
}

.timeline-dot.active {
    background: var(--primary-color, #3b82f6);
    border-color: var(--primary-color, #3b82f6);
    color: #fff;
}

/* Day Sections */
.travel-content {
    padding: 2rem 0 4rem;
}

.day-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.day-section:last-child {
    margin-bottom: 0;
}

.day-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.day-badge {
    flex-shrink: 0;
    width: 80px;
    min-height: 80px;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--primary-dark, #2563eb));
    color: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.2;
}

.day-badge-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.day-info {
    flex: 1;
}

.day-date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    margin-bottom: 0.25rem;
}

.day-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.day-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.day-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.day-location svg {
    color: var(--primary-color, #3b82f6);
}

/* Highlight */
.day-highlight {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.highlight-icon {
    font-size: 1.25rem;
}

.day-highlight p {
    margin: 0;
    font-style: italic;
    color: #92400e;
}

/* Description */
.day-description {
    max-width: 800px;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-primary, #333);
}

.day-description p {
    margin: 0;
}

/* Day Photos Grid */
.day-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.day-photos .gallery-item {
    position: relative !important;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
}

.day-photos .gallery-link {
    display: block;
    width: 100%;
    height: 100%;
}

.day-photos .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.day-photos .gallery-item:hover img {
    transform: scale(1.05);
}

/* EXIF flags for travel gallery photos */
.day-photos .exif-flags {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.day-photos .gallery-item:hover .exif-flags,
.layout-grid .gallery-item:hover .exif-flags {
    opacity: 1 !important;
}

.day-photos .exif-flag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #fff;
    border-radius: 3px;
    white-space: nowrap;
}

.day-photos .exif-focal { background: rgba(59, 130, 246, 0.9); }
.day-photos .exif-aperture { background: rgba(16, 185, 129, 0.9); }
.day-photos .exif-shutter { background: rgba(245, 158, 11, 0.9); }
.day-photos .exif-iso { background: rgba(239, 68, 68, 0.9); }
.day-photos .exif-mode { background: rgba(139, 92, 246, 0.9); }

.day-no-photos {
    padding: 2rem;
    text-align: center;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

/* Unassigned Section */
.unassigned-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color, #e5e7eb);
}

.unassigned-section .day-badge {
    background: var(--text-secondary, #6b7280);
}

/* Unlock Banner - Legacy, replaced by .btn-unlock in header */

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: var(--text-secondary, #666);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.alert-error {
    padding: 0.75rem 1rem;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    margin-top: 1rem;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color, #3b82f6);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark, #2563eb);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .travel-header h1 {
        font-size: 1.75rem;
    }

    .travel-map {
        height: 300px;
    }

    .timeline-dot {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .day-header {
        flex-direction: column;
        gap: 1rem;
    }

    .day-badge {
        width: 60px;
        height: 60px;
        font-size: 0.85rem;
    }

    .day-title {
        font-size: 1.25rem;
    }

    .day-photos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}
