/* --- POPUP STYLES --- */
.image-swiper-popup .leaflet-popup-content-wrapper {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 10px;
}

.image-swiper-popup .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.image-swiper-popup .leaflet-popup-tip-container {
    display: none;
}

.custom-popup-content {
    width: 300px;
    height: 533px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    background-color: #222;
}

.custom-popup-content .swiper-container { /* Scoped to popup */
    width: 100%;
    height: 100%;
}

.custom-popup-content .swiper-slide { /* Scoped to popup */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
}

.custom-popup-content .swiper-slide img { /* Scoped to popup */
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-popup-content .swiper-button-next,
.custom-popup-content .swiper-button-prev { /* Scoped to popup */
    color: rgba(255, 255, 255, 0.8);
    --swiper-navigation-size: 28px;
    z-index: 12;
}

.custom-popup-content .swiper-button-next::after,
.custom-popup-content .swiper-button-prev::after { /* Scoped to popup */
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.custom-popup-content .swiper-pagination { /* Scoped to popup */
    z-index: 12;
    bottom: 8px !important;
}

.custom-popup-content .swiper-pagination-bullet { /* Scoped to popup */
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    width: 7px;
    height: 7px;
}

.custom-popup-content .swiper-pagination-bullet-active { /* Scoped to popup */
    background: #ffffff;
}

.popup-details-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 15px;
    padding-bottom: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 35%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    box-sizing: border-box;
    max-height: 60%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.popup-header {
    width: 100%;
    padding-bottom: 8px;
    margin-bottom: auto;
}

.popup-name {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    overflow-wrap: break-word;
    max-width: 100%;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 12px;
    width: 100%;
    padding-top: 8px;
    color: #e0e0e0;
}

.popup-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 60%;
    line-height: 1.4;
    margin-right: 14px;
}

.popup-event-date {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #f4f4f4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.popup-links,
.popup-offers {
    line-height: 1.4;
}

.popup-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: flex-end;
}

.popup-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon {
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.action-item > a {
    color: inherit;
    text-decoration: none;
    display: flex;
}

.action-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background-color: rgba(30, 30, 30, 0.92);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s 0.2s linear, transform 0.2s ease;
    transform-origin: bottom center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.action-item.active .action-icon {
    color: #c0d8f0;
    transform: scale(1.15);
}

.action-item.active .action-menu {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
    transform: translateX(-50%) translateY(0);
}

.action-menu a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-size: 18px;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
}

.action-menu a.copy-link-button {
    cursor: pointer;
}

.action-menu .fa-check {
    color: #2ecc71;
}

.popup-offers {
    color: #f0f0f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: flex-start;
    gap: 6px;
    align-items: center;
}

.popup-offers .offer-icon-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: default;
    padding: 2px;
}

.popup-offers .offer-icon-item i {
    line-height: 1;
}

/* Lazy Loading Swiper Image Styles */
.custom-popup-content .swiper-slide img.swiper-lazy { /* Scoped */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.custom-popup-content .swiper-slide img.swiper-lazy-loaded { /* Scoped */
    opacity: 1;
}

/* Animated preloader for Swiper lazy loading */
.swiper-lazy-preloader { /* This can be global if structure is same for fullscreen */
    width: 32px;
    height: 32px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -16px;
    margin-top: -16px;
    z-index: 10;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    animation: swiper-preloader-spin 1s linear infinite;
    box-sizing: border-box;
}

@keyframes swiper-preloader-spin {
    100% {
        transform: rotate(360deg);
    }
}

.popup-fullsize-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 15;
    background-color: rgba(30, 30, 30, 0.6);
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.popup-fullsize-icon i {
    display: block;
}

.custom-popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    background-color: rgba(30, 30, 30, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    width: 32px;
    height: 32px;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.popup-admin-actions {
    text-align: center;
    margin-bottom: 8px;
}

.popup-admin-actions a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    margin: 0 8px;
    transition: color 0.2s, transform 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    display: inline-block; /* for transform */
}

.popup-admin-actions a:hover {
    color: #ffc107; /* Amber/gold for emphasis */
    transform: scale(1.1);
}
