/**
 * 3 Walls Iframe Viewer CSS
 *
 * @package ThreeWalls_Access
 */

/* Iframe Viewer Container */
.twa-iframe-viewer {
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    overflow: hidden;
}

/* Device Toggle */
.twa-device-toggle {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.twa-device-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s;
}

.twa-device-btn:hover {
    border-color: var(--twa-primary, #2b64cc);
    color: var(--twa-primary, #2b64cc);
}

.twa-device-btn.active {
    background: var(--twa-primary, #2b64cc);
    border-color: var(--twa-primary, #2b64cc);
    color: white;
}

.twa-device-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Iframe Wrapper */
.twa-iframe-wrap {
    position: relative;
    width: 100%;
    background: #000;
    margin: 0 auto;
    transition: all 0.3s;
}

/* Device Modes */
.twa-iframe-wrap.device-desktop {
    aspect-ratio: 16/9;
    max-width: 100%;
}

.twa-iframe-wrap.device-mobile-h {
    aspect-ratio: 16/9;
    max-width: 768px;
}

.twa-iframe-wrap.device-mobile-v {
    aspect-ratio: 9/16;
    max-width: 375px;
}

.twa-iframe-wrap iframe,
.twa-iframe-wrap .embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Trial Notice */
.twa-trial-notice {
    padding: 15px 20px;
    background: #fffbeb;
    border-top: 1px solid #fef3c7;
    text-align: center;
}

.twa-trial-notice p {
    margin: 0;
    color: #78350f;
    font-size: 14px;
}

/* Modal Overlay */
.twa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal */
.twa-modal {
    background: white;
    border-radius: 16px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.twa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.twa-modal-title {
    margin: 0;
    font-size: 20px;
    color: var(--twa-dark, #0f182b);
}

.twa-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #6b7280;
    transition: all 0.3s;
}

.twa-modal-close:hover {
    color: var(--twa-dark, #0f182b);
}

.twa-modal-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.twa-modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.twa-iframe-container {
    position: relative;
    width: 100%;
    background: #000;
    margin: 20px auto 0;
    border-radius: 8px;
    overflow: hidden;
}

/* PDF Download Card */
.twa-pdf-download-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin: 20px 0;
}

.twa-pdf-download-card.preview {
    border-color: #fbbf24;
    background: #fffbeb;
}

.twa-pdf-download-card.full {
    border-color: var(--twa-primary, #2b64cc);
    background: #eff6ff;
}

.twa-pdf-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
}

.twa-pdf-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #dc2626;
}

.twa-pdf-info {
    flex: 1;
}

.twa-pdf-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--twa-dark, #0f182b);
}

.twa-pdf-meta {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.twa-pdf-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fbbf24;
    color: #78350f;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

.twa-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: var(--twa-primary, #2b64cc);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.twa-btn-pdf:hover {
    filter: brightness(0.9);
    color: white;
}

.twa-pdf-note {
    margin: 10px 0;
    padding: 10px;
    background: #fef3c7;
    border-left: 4px solid #fbbf24;
    font-size: 14px;
    color: #78350f;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 767px) {
    .twa-device-toggle {
        flex-wrap: wrap;
    }

    .twa-device-label {
        display: none;
    }

    .twa-pdf-download-card {
        flex-direction: column;
        text-align: center;
    }

    .twa-modal {
        max-height: 95vh;
    }

    .twa-modal-header {
        padding: 15px;
    }

    .twa-modal-title {
        font-size: 16px;
    }
}
