/**
 * Photo Overlay Component
 * Styles for photo expansion overlay
 */

/* Photo Overlay */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 1000;
    pointer-events: none;
    transition: all 0.5s ease;
    opacity: 0;
    visibility: hidden;
    display: none;
    justify-content: center;
    align-items: center;
}

/* Ensure photo overlay is hidden when hidden attribute is present - high specificity to override glass scripts */
.photo-overlay[hidden],
body .photo-overlay:not(.active) {
    display: none !important;
    visibility: hidden !important;
}

/* Show photo overlay when active and not hidden - !important needed to override glass effect inline styles */
.photo-overlay.active:not([hidden]) {
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    pointer-events: auto;
    opacity: 1;
    visibility: visible !important;
    display: flex !important;
}

/* Ensure photo overlay content is hidden when not active - high specificity */
.photo-overlay:not(.active) .expanded-photo-container,
.photo-overlay[hidden] .expanded-photo-container {
    display: none !important;
    visibility: hidden !important;
}

.expanded-photo-container {
    position: relative;
    width: auto;
    max-width: 80vw;
    max-height: 80vh;
    background: var(--color-dark-grey);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.expanded-photo-container img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.expanded-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1em;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
}

/* Ensure photo overlay close button matches card overlay */
.photo-overlay .close-button {
    position: absolute;
    top: 1em;
    right: 1em;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 2em;
    cursor: pointer;
    color: var(--color-white);
    padding: 0.2em 0.5em;
    border-radius: 50%;
    transition: all var(--transition-base);
    z-index: 2;
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.photo-overlay .close-button:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.photo-overlay .close-button:focus {
    outline: 2px solid rgba(93, 143, 179, 0.6);
    outline-offset: 2px;
}

.photo-overlay .close-button:focus:not(:focus-visible) {
    outline: none;
}

.photo-overlay .close-button:active {
    transform: scale(0.95);
}

