/* Minimal Preview Page Styles */

:root {
    --bg-dark: #0a0a0f;
    --bg-topbar: #121218;
    --primary: #6366f1;
    --text: #ffffff;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1.5rem;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.logo img {
    height: 28px;
    opacity: 0.9;
}

/* Device Selector - Centered */
.device-selector {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
}

.device-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.device-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.device-btn.active {
    color: var(--text);
    background: var(--primary);
}

/* Video Toggle */
.video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.video-btn:hover,
.video-btn.active {
    color: var(--text);
    border-color: var(--primary);
}

/* Preview Container */
.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

/* Device Frame */
.device-frame {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.device-frame[data-device="desktop"] {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.device-frame[data-device="laptop"] {
    width: 90%;
    max-width: 1200px;
    height: 85%;
    max-height: 700px;
}

.device-frame[data-device="tablet"] {
    width: 600px;
    height: 960px;
    max-height: calc(100vh - 90px);
    border-radius: 24px;
    padding: 12px;
}

.device-frame[data-device="tablet-landscape"] {
    width: 960px;
    height: 600px;
    max-height: calc(100vh - 90px);
    border-radius: 24px;
    padding: 12px;
}

.device-frame[data-device="mobile"] {
    width: 412px;
    height: 915px;
    max-height: calc(100vh - 90px);
    border-radius: 32px;
    padding: 10px;
}

.device-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    border-radius: inherit;
}

.device-frame[data-device="desktop"] iframe {
    border-radius: 0;
}

/* Placeholder */
.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.placeholder.hidden {
    display: none;
}

.placeholder p {
    font-size: 0.9rem;
}

.url-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.url-input-wrapper input {
    padding: 0.75rem 1rem;
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
}

.url-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.url-input-wrapper button {
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.url-input-wrapper button:hover {
    opacity: 0.9;
}

/* Floating Video Window */
.floating-video {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    height: 300px;
    background: var(--bg-topbar);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-video.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.floating-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
}

.close-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

/* Topbar Feedback */
.topbar-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-feedback-text {
    font-size: 1rem;
    color: #b0b0b8;
    white-space: nowrap;
}

.topbar-feedback-faces {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Reopen Video Button */
.reopen-video-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #e53935;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(229, 57, 53, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

.reopen-video-btn svg {
    width: 24px;
    height: 24px;
}

.reopen-video-btn:hover {
    background: #c62828;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(229, 57, 53, 0.5);
}

.reopen-video-btn.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .device-frame[data-device="laptop"] {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .floating-video {
        /*width: 300px;
        height: 280px;
        bottom: 10px;
        right: 10px;*/
		display: none;
    }

    .video-container {
        min-height: 180px;
    }
}

@media (max-width: 600px) {

    /* Nasconde tutta la topbar per guadagnare spazio */
    .topbar {
        display: none;
    }

    /* Il contenuto prende tutto lo schermo */
    .preview-container {
        padding: 0;
    }

    .device-frame {
        border-radius: 0 !important;
    }

    /* Video più piccolo su smartphone */
    .floating-video {
        /*width: 260px;
        height: 220px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 10px;*/
		display: none;
    }

    .video-container {
        min-height: 140px;
    }

    .floating-video-header {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }

    .video-actions {
        padding: 6px;
    }

    .video-btn {
        font-size: 0.65rem;
        padding: 5px 8px;
    }

    /* Nasconde la sezione voto su smartphone */
    .topbar-feedback {
        display: none;
    }
}

/* Video Container */
.video-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

/* Video Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play Button */
.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #e53935;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #c62828;
    transform: scale(1.1);
}

.play-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Video Actions Buttons */
.video-actions {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: var(--bg-topbar);
}

.video-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-consulenza {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-consulenza:hover {
    background: var(--primary);
    color: white;
}

.btn-acquisto {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
}

.btn-acquisto:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}



.face-btn {
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.face-btn svg {
    width: 35px;
    height: 35px;
    transition: all 0.2s ease;
}

.face-btn:hover {
    transform: scale(1.2);
}

.face-btn:hover svg,
.face-btn.selected svg {
    filter: drop-shadow(0 0 8px currentColor);
}

.face-happy {
    color: #22c55e;
}

.face-neutral {
    color: #eab308;
}

.face-sad {
    color: #ef4444;
}

/* Thank You Modal */
.thank-you-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.thank-you-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-topbar);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
}

.thank-you-modal.visible .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #22c55e;
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.modal-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}