/**
 * Wedding Overlay Frontend Styles
 * @package WeddingOverlay
 * @version 3.0.0
 */

/* ===================================
   Overlay Container
   =================================== */
.wedding-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.8s ease;
}

.wedding-overlay-container:focus {
    outline: 3px solid #4A90E2;
    outline-offset: -3px;
}

/* ===================================
   Background Image
   =================================== */
.wedding-overlay-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.wedding-overlay-background-image.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* ===================================
   Content Wrapper
   =================================== */
.wedding-overlay-content {
    position: relative;
    z-index: 10;
    pointer-events: none;
    text-align: center;
    padding: 20px;
}

/* ===================================
   Text Styles
   =================================== */
.wedding-overlay-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #333333;
    margin: 0;
    padding: 15px 30px;
    border: 2px solid currentColor;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    animation: fadeInScale 0.6s ease-out;
}

.wedding-overlay-container:hover .wedding-overlay-text {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Video Styles
   =================================== */
.wedding-overlay-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    display: none;
    opacity: 1;
}

.wedding-overlay-video.playing {
    display: block;
}

/* ===================================
   Audio Element (hidden)
   =================================== */
.wedding-overlay-audio {
    display: none;
}

/* ===================================
   Music Control Button
   =================================== */
.wedding-music-control {
    position: fixed;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: none !important;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
}

.wedding-music-control.visible {
    display: flex !important;
}

.wedding-music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.wedding-music-control:active {
    transform: scale(0.95);
}

.wedding-music-control:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Music Icon */
.wedding-music-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 24px;
    color: #333333;
    transition: opacity 0.2s ease;
}

/* Icon states */
.wedding-music-icon.playing::before {
    content: '🎵';
}

.wedding-music-icon.paused::before {
    content: '🔇';
}

/* Animations */
@keyframes musicPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.wedding-music-control.playing .wedding-music-icon {
    animation: musicPulse 2s ease-in-out infinite;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.wedding-overlay-text {
    animation: fadeInScale 0.6s ease-out, pulse 2s ease-in-out infinite 1s;
}

/* ===================================
   Accessibility
   =================================== */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===================================
   State Classes
   =================================== */
.wedding-overlay-container.hidden {
    display: none !important;
}

.wedding-overlay-container.fading-out {
    opacity: 0;
}

/* ===================================
   Loading State
   =================================== */
.wedding-overlay-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.wedding-overlay-container.loading::before {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .wedding-overlay-text {
        font-size: 12px;
        letter-spacing: 1.5px;
        padding: 12px 24px;
    }
    
    .wedding-music-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .wedding-music-bottom-right,
    .wedding-music-bottom-left {
        bottom: 20px;
    }
    
    .wedding-music-bottom-right,
    .wedding-music-top-right {
        right: 20px;
    }
    
    .wedding-music-bottom-left,
    .wedding-music-top-left {
        left: 20px;
    }
    
    .wedding-music-top-right,
    .wedding-music-top-left {
        top: 20px;
    }
}

@media (max-width: 480px) {
    .wedding-overlay-text {
        font-size: 11px;
        letter-spacing: 1px;
        padding: 10px 20px;
    }
    
    .wedding-music-control {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .wedding-overlay-container,
    .wedding-music-control {
        display: none !important;
    }
}

/* ===================================
   Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .wedding-overlay-container,
    .wedding-overlay-text,
    .wedding-music-control {
        animation: none !important;
        transition: none !important;
    }
}
