/* Popup Wrapper & Overlay */
#wi-popup-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    cursor: pointer;
}

/* Main Popup Container */
#wi-popup {
    display: grid;
    grid-template-columns: 1fr;
    background-color: var(--e-global-color-328e76c);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    cursor: auto;
    z-index: 10000;
}

#wi-popup .wi-popup-content {
    min-width: 100%;
}

/* Scrollable Content Area */
#wi-popup .wi-column {
    overflow-y: auto;
    padding-right: 15px;
    max-height: 80vh;
}

#wi-popup .wi-column::-webkit-scrollbar {
    background-color: transparent;
    width: 8px;
}

#wi-popup .wi-column::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--e-global-color-accent) 40%, transparent 40%);
    border-radius: 0;
}

/* Top Controls (Close Button & Language Switcher) */
.wi-popup-top-controls { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    gap: 20px;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

#wi-popup .wi-close {
    width: 12px;
    height: 12px;
    background-image: url('/wp-content/uploads/2024/07/close.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
#wi-popup .wi-close:hover {
    opacity: 1;
}

.wi-lang-switcher { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    color: var(--e-global-color-primary); 
    font-size: 14px; 
    font-weight: 600;
}
.wi-lang-switcher a[data-lang] { 
    cursor: pointer; 
    opacity: 0.6; 
    transition: opacity 0.2s; 
    text-decoration: unset;
}
.wi-lang-switcher a[data-lang]:hover,
.wi-lang-switcher a[data-lang].active { 
    color: var(--e-global-color-accent); 
    font-weight: 700; 
    opacity: 1; 
}


/* Header & Content Typography */
#wi-popup .wi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 20px;
    color: var(--e-global-color-primary);
    font-size: 14px;
    padding-right: 100px;
}

#wi-popup .wi-row div.wi-taxonomy-field {
    padding-left: 16px;
    position: relative;
}

#wi-popup .wi-row div.wi-taxonomy-field::before {
    content: "";
    width: 1px;
    height: 100%;
    background-color: var(--e-global-color-text);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.5;
}

#wi-popup .wi-popup-title {
    color: var(--e-global-color-accent);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    margin-top: 0;
}

#wi-popup .wi-popup-description {
    color: var(--e-global-color-primary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
    text-align: justify;
    word-wrap: break-word;
}
#wi-popup .wi-popup-description a:hover {
    color: var(--e-global-color-accent);
}

/* Detail Elements & Links */
.wi-element {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 20px;
    color: var(--e-global-color-primary);
}

#wi-popup .wi-label {
    font-size: 18px;
    font-weight: 600;
}

#wi-popup .wi-value, 
#wi-popup .wi-term-wrapper {
    word-wrap: break-word;
}

#wi-popup .wi-links {
    margin-top: 30px;
}
#wi-popup .wi-links .wi-value {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.wi-links #wi-links p {
    margin: 0;
}
.wi-links #wi-links p a {
    color: var(--e-global-color-primary);
    text-decoration: underline;
    word-break: break-all;
}
.wi-links #wi-links p a:hover {
    color: var(--e-global-color-accent);
}

/* Social Share Icons */
#wi-popup #wi-share-soc {
    display: flex;
    flex-direction: row;
	align-items: center;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

#wi-share-soc a {
    display: block;
    transition: transform 0.2s ease;
}
#wi-share-soc a:hover {
    transform: scale(1.1);
}
#wi-share-soc a path {
    fill: var(--e-global-color-primary);
    transition: fill 0.2s ease;
}
#wi-share-soc a:hover path {
    fill: var(--e-global-color-accent);
}

/* Fallback & Other States */
.wi-translation-not-found { 
    padding: 80px 20px; 
    text-align: center; 
    font-size: 20px; 
    color: var(--e-global-color-primary); 
    min-height: 50vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

#edit-incident-link > a {
    color: #fff;
}

/* Tablet & Desktop Styles */
@media (min-width: 768px) {
    #wi-popup {
        grid-template-columns: 1fr 50px;
        padding: 25px;
    }

    #wi-popup .wi-popup-title {
        font-size: 24px;
    }

    #wi-popup .wi-row {
        font-size: 16px;
        margin-bottom: 42px;
    }

    .wi-element {
        flex-direction: row;
        gap: 15px;
        font-size: 18px;
    }

    #wi-popup #wi-share-soc {
        flex-direction: column;
        justify-content: center;
        gap: 15px;
        margin: 0;
        padding-top: 60px;
        grid-column: 2 / 3;
        grid-row: 1 / -1;
    }
}


.wi-victim-details {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
}
.wi-victim-details span {
    color: var(--e-global-color-primary);
    font-size: inherit;
}

/* Filter & Other Styles */

#wi-incidents-container article {
    cursor: pointer;
}

/* Card - Terms */
.wi-incident-terms.top div.elementor-heading-title {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 5px;
}

/* Filter */
.wi-filter-container {
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 20px;
    margin-bottom: 0;
}

.wi-filter-container .wi-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 calc(25% - 12px);
    max-width: calc(25% - 12px);
}
#wi-incident-type .wi_bold {
    font-weight: 700;
}

/* Labels */
.wi-filter-container .wi-field label {
    font-size: 14px;
    font-weight: 700;
    line-height: normal;
}

/* Buttons */
.wi-buttons-container {
    display: flex;
    flex: 1 1 calc(50% - 12px);
    align-items: end;
    gap: 12px;
}
.wi-buttons-container button, .wi-date-field input {
    width: calc(50% - 12px);
    cursor: pointer;
}
.wi-date-field input {
    max-width: 100%;
}
.wi-buttons-container button:hover {
    color: var(--e-global-color-1dd5faa);
    background-color: var(--e-global-color-primary);
}

/* Date */
.wi-date-field {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wi-date-field li > label {
    display: block;
    width: inherit;
}
.wi-date-field input.wi-datepicker, .wi-date-field > li {
    width: 100%;
}

/* Fields */
.wi-filter-container .wi-field select {
    height: 100%;
}

.wi-filter-container .wi-field select, .wi-date-field input.wi-datepicker, .wi-buttons-container button {
    padding: 10px 8px !important;
    background-color: var(--e-global-color-328e76c) !important;
    border: none !important;
    outline: none;
    border-bottom: 2px solid var(--e-global-color-primary) !important;
    min-height: 48px;
    color: var(--e-global-color-primary) !important;
    font-size: 12px !important;
    font-weight: 400;
    line-height: 14px;
    cursor: pointer;
}
.wi-buttons-container button {
    font-weight: 700;
}

/* Desktop/Tablet */
@media (min-width: 768px) {
    /* Cards */
    .wi-incident-terms.top div.elementor-heading-title:before {
        content: '';
        height: 12px;
        width: 1px;
        background-color: var(--e-global-color-text);
        position: absolute;
        left: 0;
        top: 6px;
    }
}

/* Tablet/Mobile */
@media (max-width: 1024px) {
    .wi-filter-container .wi-field {
        flex: 1 1 calc(50% - 12px);
        max-width: calc(50% - 12px);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .wi-filter-container .wi-field label {
        font-size: 10px;
    }
}

#elementor-popup-modal-1937 > div > div.dialog-message.dialog-lightbox-message > div:focus-visible {
    outline: none !important;
}
#wi-close-modal {
    cursor: pointer;
}
#wi-close-modal:hover {
    opacity: 0.4;
}

#wi-popup-container:before {
    content: '';
    display: block;
    width: 42px;
    height: 16px;
    background-color: var(--e-global-color-accent);
}
