/* ================================================================
   SQUARE SCAN PROGRESS OVERLAY WITH SLIDESHOW
   ================================================================ */

.scan-progress-overlay-square {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.scan-progress-overlay-square.is-active {
    display: flex;
    animation: overlay-fade-in 0.4s ease forwards;
}

.scan-progress__backdrop {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.75);
}

.scan-progress__content-square {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

body.scan-dimmed header,
body.scan-dimmed .hero,
body.scan-dimmed section,
body.scan-dimmed footer {
    opacity: 0.12;
    filter: blur(2px);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

body.scan-dimmed .scan-progress-overlay-square {
    opacity: 1;
    filter: none;
}

/* Square Container - 60-70% of page width */
.scan-square-container {
    position: relative;
    width: 70%;
    max-width: 1200px;
    aspect-ratio: 1 / 1;
    background: #000;
    border: 2px solid var(--accent, #00ff00);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.3);
}

/* Slideshow Container */
.scan-slideshow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

/* Text Slides */
.slide-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    text-align: center;
    transition: opacity 1s ease-in-out;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(10, 20, 10, 0.95) 100%
    );
}

.slide-text.active {
    opacity: 1;
}

.slide-text h3 {
    font-family: var(--font-display, 'Michroma', monospace);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 30px 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.slide-text p {
    font-size: clamp(1.1rem, 2.3vw, 1.35rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin: 0 0 20px 0;
    max-width: 90%;
}

.slide-text p.highlight {
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    color: #fff;
    font-weight: 600;
    margin-top: 30px;
    padding: 20px 30px;
    background: rgba(0, 255, 0, 0.08);
    border-left: 3px solid var(--accent, #00ff00);
    border-radius: 4px;
    line-height: 1.6;
    max-width: 95%;
}

.slide-text p.highlight-strong {
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    color: var(--accent, #00ff00);
    font-weight: 700;
    margin-top: 25px;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    letter-spacing: 0.01em;
}

/* CTA Slide (Slide 9) */
.slide-text.slide-cta {
    background: linear-gradient(135deg, 
        rgba(0, 20, 0, 0.95) 0%, 
        rgba(0, 40, 0, 0.95) 100%
    );
}

.slide-text.slide-cta h3 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    margin-bottom: 35px;
}

/* Testimonial Slides */
.slide-text.slide-testimonial {
    background: linear-gradient(135deg, 
        rgba(10, 10, 20, 0.95) 0%, 
        rgba(0, 20, 30, 0.95) 100%
    );
    padding: 80px 60px;
}

.testimonial-quote {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    line-height: 1.8;
    margin: 0 0 30px 0;
    position: relative;
    padding: 0 30px;
    max-width: 100%;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    left: -10px;
    top: -20px;
    font-size: 4rem;
    color: var(--accent, #00ff00);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.testimonial-author {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--accent, #00ff00);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.05em;
}

/* Deprecated image styles - keeping for backwards compatibility */
.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide-image.active {
    opacity: 1;
}

/* Overlay Content on top of slideshow */
.scan-overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    padding: 30px;
}

/* Messages Area */
.scan-messages-area {
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
    min-height: 100px;
}

.scan-status-message {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: left;
    margin: 0;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border-left: 3px solid var(--accent, #00ff00);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scan-status-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Bar Container at Bottom */
.scan-progress-bar-container {
    margin-top: auto;
}

.scan-progress-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0 0 12px 0;
    text-align: left;
    font-family: var(--font-display, 'Michroma', monospace);
    letter-spacing: 0.05em;
}

.scan-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.scan-progress-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent, #00ff00) 0%, #00eaff 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on progress bar */
.scan-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

@keyframes overlay-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .scan-square-container {
        width: 80%;
    }
    
    .slide-text {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .scan-square-container {
        width: 95%;
        /* Keep same aspect ratio on mobile */
    }
    
    .scan-overlay-content {
        padding: 20px;
    }
    
    .scan-status-message {
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    .scan-progress-text {
        font-size: 0.9rem;
    }
    
    .scan-progress-bar {
        height: 10px;
    }
    
    .slide-text {
        padding: 40px 30px;
    }
    
    .slide-text h3 {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
        margin-bottom: 20px;
    }
    
    .slide-text p {
        font-size: clamp(1rem, 3.2vw, 1.2rem);
        margin-bottom: 15px;
    }
    
    .slide-text p.highlight {
        font-size: clamp(0.95rem, 3.2vw, 1.1rem);
        padding: 15px 20px;
        margin-top: 20px;
    }
    
    .slide-text.slide-testimonial {
        padding: 50px 35px;
    }
    
    .testimonial-quote {
        font-size: clamp(1rem, 3.5vw, 1.25rem);
        padding: 0 15px;
    }
    
    .testimonial-quote::before {
        font-size: 3rem;
        top: -15px;
        left: -5px;
    }
}

@media (max-width: 480px) {
    .scan-square-container {
        width: 100%;
        border-radius: 0;
    }
    
    .scan-status-message {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .scan-overlay-content {
        padding: 15px;
    }
    
    .slide-text {
        padding: 30px 20px;
    }
    
    .slide-text h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .slide-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .slide-text p.highlight {
        font-size: 0.9rem;
        padding: 12px 15px;
        margin-top: 15px;
    }
    
    .slide-text p.highlight-strong {
        font-size: 1rem;
        margin-top: 20px;
    }
    
    .slide-text.slide-testimonial {
        padding: 40px 25px;
    }
    
    .testimonial-quote {
        font-size: 0.95rem;
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .testimonial-quote::before {
        font-size: 2.5rem;
        top: -10px;
        left: 0;
    }
    
    .testimonial-author {
        font-size: 0.9rem;
    }
}

