/**
 * Profile Photos Timeline Styles
 */

/* Add Photo Button – dunkles Grau wie alle Add-Buttons */
.btn-add-profile-photo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
}

.btn-add-profile-photo:hover {
    background: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.btn-add-profile-photo svg {
    width: 20px;
    height: 20px;
}

.file-upload-hint {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    margin-top: 4px;
}

/* Photos List */
.profile-photos-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-photo-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    padding: 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.profile-photo-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Photo Preview Area */
.profile-photo-upload-area {
    width: 180px;
    height: 240px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.profile-photo-upload-area:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.profile-photo-upload-area.dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.profile-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.profile-photo-placeholder svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.profile-photo-placeholder span {
    font-size: 14px;
}

.profile-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Automatically centers and crops */
    object-position: center center; /* Ensure center positioning */
    border-radius: 8px;
}

/* Photo Details */
.profile-photo-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-photo-date-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-photo-date-input label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.profile-photo-date,
.profile-photo-year {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.profile-photo-date:focus,
.profile-photo-year:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profile-photo-date-or {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    font-weight: 500;
}

.profile-photo-remove {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-photo-remove:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.profile-photo-remove svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
/* Profile Fullscreen Modal */
.profile-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 60px 40px 40px;
}

.profile-fullscreen-modal.active {
    display: flex;
}

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

.profile-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.profile-fullscreen-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    position: relative;
    margin-bottom: 40px;
}

.profile-fullscreen-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: transform, filter, opacity;
}

.profile-fullscreen-image.morphing {
    opacity: 0.3;
    animation: morph-pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-fullscreen-image.morphing-aging {
    animation: morph-aging 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-fullscreen-image.morphing-rejuvenating {
    animation: morph-rejuvenating 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Morph Animation Keyframes */
@keyframes morph-pulse {
    0% {
        filter: blur(0px) brightness(1);
        transform: scale(1) rotate(0deg);
    }
    25% {
        filter: blur(8px) brightness(1.1);
        transform: scale(1.08);
    }
    50% {
        filter: blur(15px) brightness(1.2);
        transform: scale(1.15);
    }
    75% {
        filter: blur(8px) brightness(1.1);
        transform: scale(1.08);
    }
    100% {
        filter: blur(0px) brightness(1);
        transform: scale(1) rotate(0deg);
    }
}

@keyframes morph-aging {
    0% {
        filter: blur(0px) brightness(1) sepia(0);
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    20% {
        filter: blur(5px) brightness(1.05) sepia(0.2);
        transform: scale(1.05) rotate(1deg);
        opacity: 0.8;
    }
    50% {
        filter: blur(15px) brightness(1.2) sepia(0.4);
        transform: scale(1.15) rotate(2deg);
        opacity: 0;
    }
    80% {
        filter: blur(5px) brightness(1.05) sepia(0.2);
        transform: scale(1.05) rotate(1deg);
        opacity: 0.8;
    }
    100% {
        filter: blur(0px) brightness(1) sepia(0);
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes morph-rejuvenating {
    0% {
        filter: blur(0px) brightness(1) saturate(1);
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    20% {
        filter: blur(5px) brightness(0.95) saturate(1.1);
        transform: scale(0.95) rotate(-1deg);
        opacity: 0.8;
    }
    50% {
        filter: blur(15px) brightness(1.2) saturate(1.3);
        transform: scale(0.85) rotate(-2deg);
        opacity: 0;
    }
    80% {
        filter: blur(5px) brightness(0.95) saturate(1.1);
        transform: scale(0.95) rotate(-1deg);
        opacity: 0.8;
    }
    100% {
        filter: blur(0px) brightness(1) saturate(1);
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Timeline Controls */
.profile-timeline-controls {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-timeline-date-display {
    text-align: center;
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.profile-timeline-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 20px;
    cursor: pointer;
}

.profile-timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.profile-timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.profile-timeline-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.profile-timeline-markers {
    position: relative;
    width: 100%;
    height: 60px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 12px;
}

.profile-timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.profile-timeline-marker:hover {
    color: white;
}

.profile-timeline-marker.active {
    color: white;
    font-weight: 600;
}

.profile-timeline-marker.estimated {
    opacity: 0.7;
    font-style: italic;
}

.profile-timeline-marker.estimated .profile-timeline-marker-dot {
    border: 2px dashed rgba(255, 255, 255, 0.5);
    background: transparent;
}

.profile-timeline-marker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.profile-timeline-marker.active .profile-timeline-marker-dot {
    background: white;
    transform: scale(1.3);
}

.profile-timeline-marker.estimated.active .profile-timeline-marker-dot {
    background: rgba(255, 255, 255, 0.5);
    border-color: white;
}

/* Crop Modal */
.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.crop-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.crop-modal-content h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.crop-hint {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.crop-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    border-radius: 12px;
    background: #f1f5f9;
}

#crop-canvas {
    cursor: default;
    border-radius: 8px;
}

.crop-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-crop-cancel,
.btn-crop-confirm {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-crop-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.btn-crop-cancel:hover {
    background: #e2e8f0;
}

.btn-crop-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-crop-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}
