/* ============================================================
   Journal Photo Upload & Slideshow Styles
   ============================================================ */

/* Day Summary Card - Shows activities planned for the day */
.day-summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.day-summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    color: white;
}

.day-summary-header .badge {
    margin-left: auto;
}

.day-summary-activities {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.day-summary-activity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    color: white;
}

.day-summary-activity:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

.day-summary-activity .activity-emoji {
    font-size: 24px;
    line-height: 1;
}

.day-summary-activity .activity-details {
    flex: 1;
    min-width: 0;
}

.day-summary-activity .activity-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.day-summary-activity .activity-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-top: 2px;
}

.day-summary-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

@media (max-width: 768px) {
    .day-summary-card {
        padding: 16px;
    }
    
    .day-summary-activity {
        padding: 10px;
    }
    
    .day-summary-activity .activity-emoji {
        font-size: 20px;
    }
}

/* Photo Upload Zone */
.photo-upload-zone {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color, #0d6efd);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    width: fit-content;
}

.photo-upload-btn:hover {
    background: var(--primary-hover, #0b5ed7);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.photo-upload-progress {
    display: flex;
    align-items: center;
    color: var(--text-muted, #6c757d);
    font-size: 14px;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}

.photo-grid-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
}

.photo-grid-item.clickable:hover {
    transform: scale(1.03);
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.photo-grid-item:hover .photo-delete-btn {
    opacity: 1;
}

.photo-delete-btn:hover {
    background: rgb(220, 53, 69);
    transform: scale(1.1);
}

/* Journal Photos Section */
.journal-photos-section {
    padding-top: 24px;
    border-top: 1px solid #dee2e6;
}

.journal-photos-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #212529);
}

/* ============================================================
   Slideshow Overlay
   ============================================================ */

.slideshow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slideshow-container {
    width: 100%;
    height: 100%;
    max-width: 1400px;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px;
}

@media (max-width: 768px) {
    .slideshow-container {
        padding: 10px;
    }
}

.slideshow-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.slideshow-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .slideshow-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
}

.slideshow-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 0;
    position: relative;
}

.slideshow-image-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    max-height: calc(100vh - 180px);
}

@media (max-width: 768px) {
    .slideshow-image-wrapper {
        max-height: calc(100vh - 140px);
    }
}

.slideshow-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    animation: imageZoomIn 0.3s;
}

@keyframes imageZoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slideshow-caption {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
}

@media (max-width: 768px) {
    .slideshow-caption {
        font-size: 12px;
        padding: 6px 12px;
    }
}

.slideshow-nav {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.slideshow-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .slideshow-nav {
        width: 44px;
        height: 44px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
    }
    
    .slideshow-nav-prev {
        left: 10px;
    }
    
    .slideshow-nav-next {
        right: 10px;
    }
    
    .slideshow-nav:hover {
        transform: translateY(-50%) scale(1.1);
    }
}

.slideshow-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow-x: auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .slideshow-thumbnails {
        gap: 6px;
        padding: 8px;
        margin-top: 12px;
    }
}

.slideshow-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
}

.slideshow-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slideshow-thumbnail.active {
    border-color: white;
    transform: scale(1.1);
}

.slideshow-thumbnail:hover:not(.active) {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .slideshow-thumbnail {
        width: 50px;
        height: 50px;
    }
}

/* Keyboard Navigation Hint (optional) */
@media (min-width: 769px) {
    .slideshow-overlay::after {
        content: '← → Arrow keys to navigate';
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255, 255, 255, 0.5);
        font-size: 12px;
        pointer-events: none;
    }
}

/* Mobile Touch Optimization */
@media (max-width: 768px) {
    .slideshow-image {
        touch-action: manipulation;
    }
}
