/* ==========================================================================
   OAKDALE WAR MEMORIAL - LIGHTBOX COMPONENT (odw-lightbox.css)
   Purpose: Native artifact modal engine, dynamic image display wrappers,
            caption styling, and fetched mini-profile HTML containers.
   File Version: v1.3 (Refactored to inherit from odw-core.css Master Variables)
   Notes: v1.3 Hooks colors and shadows into master design tokens.
   ========================================================================== */

/* =================================================== */
/* 1. MASTER MODAL WRAPPER (Shared Base)               */
/* =================================================== */
#odw-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 15, 0.50); 
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

#odw-lightbox-modal.modal-active {
    display: flex;
}

.modal-content-wrapper {
    max-width: 85%;
    max-height: 85%;
    text-align: center;
    position: relative;
}

/* =================================================== */
/* 2. BARE-BONES THEME (Dark UI - Images & Artifacts)  */
/* =================================================== */
#odw-lightbox-modal[data-theme="bare-bones"] {
    background-color: rgba(15, 15, 15, 0.50); 
}

#odw-lightbox-modal[data-theme="bare-bones"] #modal-target-img {
    max-width: 100%;
    max-height: 75vh;
    border: 3px solid #ffffff;
    object-fit: contain;
    display: block; 
    margin: 0 auto; 
}

#odw-lightbox-modal[data-theme="bare-bones"] a:not(.modal-close-btn) {
    color: #d0c7a4; 
    text-decoration: none;
}

#odw-lightbox-modal[data-theme="bare-bones"] a:not(.modal-close-btn):hover {
    color: #ffffff; 
    text-decoration: underline dashed 1px !important;
    text-underline-offset: 4px;
    transition: color 0.2s ease-in-out;
}


/* =================================================== */
/* 3. PANELED THEME (White UI - HTML Text & Profiles)  */
/* =================================================== */

#odw-lightbox-modal[data-theme="paneled"] .modal-content-wrapper {
    max-width: 600px;
    width: 90%;
    position: relative;
    margin: 0px auto;
    border: 0px solid #ff0000;
}

#odw-lightbox-modal[data-theme="paneled"] #modal-target-html {
    display: block; 
    background-color: var(--bg-panel);
    color: var(--text-dark); 
    padding: clamp(20px, 4vw, 40px);
    border-radius: 6px;
    box-shadow: var(--shadow-lightbox); 
    max-width: 100%;
    width: 100%;
    margin: 0; 
    text-align: left; 
    max-height: 85vh; 
    overflow-y: auto; 
}

#odw-lightbox-modal[data-theme="paneled"] #modal-target-html a:not(.artifact-btn) {
    color: var(--text-dark); 
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

#odw-lightbox-modal[data-theme="paneled"] #modal-target-html a:not(.artifact-btn):hover {
    color: var(--odw-red); 
    text-decoration: underline dashed 1px var(--odw-red) !important;
    text-underline-offset: 4px;
}

#odw-lightbox-modal[data-theme="paneled"] .modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #fff; 
    width: 28px;
    height: 28px;
    border: 1px solid;
    border-color: #000;
    border-radius: 3px; 
    box-shadow: none; 
    color: #000;
    font-size: 18px;
    line-height: 1;   
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    text-shadow: none !important; 
}

#odw-lightbox-modal[data-theme="paneled"] .modal-close-btn:hover {
    background-color: var(--odw-red); 
    color: #ffffff;
    box-shadow: var(--shadow-card); 
}

/* =================================================== */
/* 4. SPECIFIC COMPONENT OVERRIDES                     */
/* =================================================== */
#odw-lightbox-modal[data-theme="paneled"] .mini-profile-content div[style*="display: flex"] {
    justify-content: space-around !important;
}

#odw-lightbox-modal[data-theme="paneled"] .mini-profile-content img[src*="medal_"] {
    width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
}



/* =================================================== */
/* 6. BARE-BONES THEME: CLOSE BUTTON ATTACHMENT        */
/* =================================================== */
#odw-lightbox-modal[data-theme="bare-bones"] .modal-close-btn {
    position: fixed; 
    top: 20px;       
    right: 30px;     
    background-color: #fff; 
    width: 28px;
    height: 28px;
    border: 1px solid;
    border-color: #000;
    border-radius: 3px; 
    color: #000; 
    font-size: 18px; 
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    text-decoration: none !important;
    text-shadow: none !important; 
    box-shadow: none; 
}

#odw-lightbox-modal[data-theme="bare-bones"] .modal-close-btn:hover {
    background-color: var(--odw-red); 
    color: #ffffff;
    border-color: var(--odw-red);
    box-shadow: var(--shadow-card); 
    text-decoration: none !important;
}

/* THE UBER MAP MODAL (Map-UI Theme) */
#odw-lightbox-modal[data-theme="map-ui"] .modal-content-wrapper {
    background-color: var(--bg-panel);
    padding: clamp(20px, 4vw, 40px);
    border-radius: 6px;
    box-shadow: var(--shadow-lightbox);
    width: 90%;
    max-width: 900px;
    position: relative;
    text-align: left;
}