/* Image Store Integration CSS für Profile */

/* Profile Tab System */
.profile-tab-content {
    display: none;
}

.profile-tab-content:first-child {
    display: block;
}

.profile-tab.active {
    background: linear-gradient(90deg,#000 0%, #c19be9 50%, #000 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Album Cards */
.profile-album-card:hover {
    transform: translateY(-5px);
}

.profile-album-card .album-preview {
    transition: transform 0.3s ease;
}

/* Photo Grid */
.photos-grid .photo-card {
    transition: all 0.3s ease;
}

.photos-grid .photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Photo overlays */
.photo-price-overlay,
.photo-view-overlay {
    transition: opacity 0.3s ease;
}

.photo-purchase-btn:hover {
    background: #0056b3 !important;
    transform: scale(1.05);
}

/* Custom Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* backdrop-filter: blur(5px); - Entfernt wegen Modal-Lesbarkeit */
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    animation: modalAppear 0.3s ease-out;
    /* Sicherstellen dass das Modal nicht verschwommen wird */
    z-index: 10001;
    backdrop-filter: none !important;
    filter: none !important;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg,#000 0%, #c19be9 50%, #000 100%) !important;
    color: white;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.modal-content {
    padding: 2rem;
}

.modal-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background: linear-gradient(90deg,#000 0%, #c19be9 50%, #000 100%) !important;
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-btn-secondary:hover {
    background: #5a6268;
}

/* Lightbox */
.album-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.lightbox-header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    padding: 1rem;
}

.lightbox-controls {
    display: flex;
    gap: 0.5rem;
}

.lightbox-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.lightbox-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    max-width: 80vw;
    max-height: 70vh;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-navigation {
    padding: 1rem;
    text-align: center;
}

.nav-info {
    color: white;
    font-size: 1rem;
}

.lightbox-purchase-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.lightbox-purchase-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }
    
    .modal-container {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .lightbox-image-container {
        max-width: 95vw;
    }
    
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lightbox-controls {
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .album-header {
        padding: 1rem !important;
    }
    
    .photos-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .photo-card .photo-image {
        height: 150px !important;
    }
}

/* Album Preview Featured Images für Album Posts */
.post-thumbnail img[src*="album-preview"],
.wp-post-image[src*="album-preview"],
img[src*="album-preview"] {
    position: relative;
}

/* Overlay für "NEUE BILDER" Text auf Album Preview Images */
.post-thumbnail:has(img[src*="album-preview"])::after,
.wp-post-image[src*="album-preview"]::after {
    content: "NEUE BILDER";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 999;
    pointer-events: none;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.post-thumbnail:has(img[src*="album-preview"]),
.wp-post-image[src*="album-preview"] {
    position: relative;
    display: inline-block;
}

/* Fallback für Browser die :has() nicht unterstützen */
.peteitcms-album-preview-featured {
    position: relative;
    display: inline-block;
}

.peteitcms-album-preview-featured::after {
    content: "NEUE BILDER";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 999;
    pointer-events: none;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* Dummy Featured Image für Album Posts */
.post-thumbnail img[src*="album-dummy"] {
    filter: blur(20px);
    position: relative;
}

/* Overlay für "NEUE BILDER" Text auf Dummy Images */
.post-thumbnail:has(img[src*="album-dummy"])::after {
    content: "NEUE BILDER";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
    pointer-events: none;
}

.post-thumbnail:has(img[src*="album-dummy"]) {
    position: relative;
    display: inline-block;
}

/* Fallback für Browser die :has() nicht unterstützen */
.peteitcms-dummy-featured-image {
    position: relative;
    display: inline-block;
}

.peteitcms-dummy-featured-image img {
    filter: blur(20px);
}

.peteitcms-dummy-featured-image::after {
    content: "NEUE BILDER";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
    pointer-events: none;
}
