/**
 * src/css/photoService.css
 * Visuelle Gestaltung der Fotogalerie, des Uploads und des Foto-Popups.
 * STATUS: Native ESM kompatibel.
 */

/* 1. UPLOAD BEREICH */
.photo-upload-section {
    width: 100%;
    margin: 30px 0;
    padding: 25px;
    background: #fcfcfc;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
}

.photo-upload-container {
    border: 2px dashed var(--gray-200);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: var(--white);
    transition: all 0.3s ease;
}

.photo-upload-container:hover {
    border-color: var(--primary-green);
    background: #f9fff9;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* 2. GALERIE RASTER */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--gray-100);
}

/* Markierung für das Hauptbild */
.photo-item.is-main {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover .grid-img {
    transform: scale(1.05);
}

/* 3. HOVER AKTIONEN (BEARBEITEN) */
.photo-item-actions {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-item:hover .photo-item-actions {
    opacity: 1;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.action-icon-btn:hover {
    transform: scale(1.1);
}

.action-ring-icon {
    width: 18px;
    height: 18px;
}

.delete-photo-btn {
    color: #ff4d4d;
}

.main-label-tag {
    background: var(--gold);
    color: var(--white);
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 4. FOTO POPUP (VORSCHAU) */
.photo-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.photo-popup-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
}

.photo-popup-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border: 3px solid var(--white);
}

.popup-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: white;
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.no-photos-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* Mobile Optimierung */
@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 10px;
    }
}