/* ============================================================ */
/* DNA Infotel - Promotions Module (Visual Logic)           */
/* Claytonmorphism & Glassmorphism 2.0 Fusion Aesthetic       */
/* ============================================================ */

/* --- A. Define Claymorphism Properties --- */
/* (Soft inflated internal light source shadows) */
:root {
    --clay-base-radius: 16px;
    --clay-shadow-light: inset 2px 2px 2px rgba(255, 255, 255, 0.3); /* highlight top-left */
    --clay-shadow-dark: inset -2px -2px 3px rgba(0, 0, 0, 0.1);    /* shadow bottom-right */
}

/* Base class for structures we want "Claymorphic" */
.dna-clay-structure {
    border-radius: var(--clay-base-radius);
    box-shadow: var(--clay-shadow-light), var(--clay-shadow-dark), 0 10px 30px rgba(0, 0, 0, 0.2); /* external shadow */
}

/* --- B. Define Glassmorphism 2.0 Properties --- */
/* ( strong backdrop blur + strong shadow depth) */
.dna-glass-surface {
    background: rgba(255, 255, 255, 0.05); /* very translucent white tint */
    backdrop-filter: blur(10px);          /* strong background blur */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); /* subtle white border */
}

/* Blend the fusion: Glass is the surface overlayed on the clay-radius body. */
.dna-clay-structure.dna-glass-surface {
    background: rgba(255, 255, 255, 0.04);
}

/* ============================================================ */
/* 1. Popup Structure (Clay-Glass Fusion)                   */
/* ============================================================ */

#dna-promo-popup {
    position: fixed;
    z-index: 99999; /* Ensure it floats above all other content */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9); /* Initially scaled down for animation */
    width: 420px;
    max-width: 90%; /* For mobile compatibility */
    padding: 10px;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none; /* Disable interaction when hidden */
}

#dna-promo-popup.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1); /* Animates in */
    pointer-events: auto; /* Enable interaction */
}

.popup-image-container {
    width: 100%;
    aspect-ratio: 1 / 1; /* Enforce 1:1 aspect ratio on the container */
    overflow: hidden;
    border-radius: calc(var(--clay-base-radius) - 6px); /* slightly smaller than outer container */
}

#popup-promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the 1:1 space without distortion */
}

/* ============================================================ */
/* 2. Sticky Strip Structure (Short/Narrow style)         */
/* ============================================================ */

#dna-promo-strip {
    position: fixed;
    z-index: 99998; /* Loads just below the main popup */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px; /* Short/narrow height */
    padding: 0 15px;
    display: flex;
    align-items: center;
    border-radius: 0; /* Sticky strip doesn't need outer radius on desktop */
}

/* Fusion blend on strip */
#dna-promo-strip.dna-glass-surface {
    background: rgba(255, 255, 255, 0.04);
}

.strip-content-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.strip-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
    display: block;
}

.strip-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.strip-image-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.strip-text-main {
    margin: 0;
    font-size: 13px;
    color: #ffffff;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Truncate text on small screens */
    font-weight: 600;
}

/* ============================================================ */
/* Common UI Elements                                          */
/* ============================================================ */

.dna-promo-close-btn {
    position: absolute;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.dna-promo-close-btn:hover {
    color: rgba(255, 0, 85, 0.8); /* Red hint on hover */
}

/* Position close button for popup top right */
#dna-promo-close {
    top: 5px;
    right: 5px;
}

/* Position close button for strip bottom right */
#dna-strip-close {
    font-size: 20px;
    right: 10px;
}

/* ============================================================ */
/* MOBILE COMPATIBILITY (RESPONSIVE)                         */
/* ============================================================ */

@media (max-width: 767px) {
    /* Adjust popup size on mobile */
    #dna-promo-popup {
        width: 320px;
        padding: 6px;
    }
    
    /* Adapt strip content */
    .strip-text-main {
        font-size: 12px;
    }
    
    /* Slightly taller strip on mobile for text padding */
    #dna-promo-strip {
        height: 50px;
    }
}