/* DLA Popup - Frontend Styles */

/* Overlay */
.dla-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.dla-popup-overlay.dla-active {
    display: flex;
}

/* Container */
.dla-popup-container {
    position: relative;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

/* Close button */
.dla-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dla-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Content */
.dla-popup-content {
    width: 100%;
}

.dla-popup-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Video wrapper */
.dla-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.dla-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Local video - no aspect ratio wrapper needed */
.dla-video-wrapper.dla-video-local {
    padding-bottom: 0;
    height: auto;
    position: relative;
}

.dla-video-wrapper.dla-video-local video {
    display: block;
    width: 100%;
    height: auto;
}

/* Unmute button */
.dla-unmute-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dla-unmute-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.dla-unmute-btn.dla-unmuted .dla-unmute-icon::before {
    content: '🔊';
}

.dla-unmute-icon {
    line-height: 1;
}

/* Form styles */
.dla-popup-form {
    width: 100%;
}

.dla-form-field {
    margin-bottom: 15px;
}

.dla-form-field input,
.dla-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.dla-form-field input:focus,
.dla-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.dla-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.dla-form-submit {
    width: 100%;
    padding: 12px 25px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dla-form-submit:hover {
    background: #005a87;
}

.dla-form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.dla-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.dla-form-message.dla-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dla-form-message.dla-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animations */

/* Fade */
.dla-animation-fade {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dla-active .dla-animation-fade {
    opacity: 1;
}

/* Slide */
.dla-animation-slide {
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.3s ease;
}

.dla-active .dla-animation-slide {
    opacity: 1;
    transform: translateY(0);
}

/* Zoom */
.dla-animation-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.dla-active .dla-animation-zoom {
    opacity: 1;
    transform: scale(1);
}

/* None */
.dla-animation-none {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .dla-popup-overlay {
        padding: 10px;
    }
    
    .dla-popup-container {
        max-width: 100% !important;
        padding: 20px !important;
    }
    
    .dla-popup-close {
        top: 5px;
        right: 5px;
    }
}

/* Loading spinner */
.dla-form-submit.dla-loading {
    position: relative;
    color: transparent;
}

.dla-form-submit.dla-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: dla-spin 0.8s linear infinite;
}

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