/* Bookness Webinar Builder - Frontend Styles */

/* Webinar shortcode wrapper */
.bookness-webinar-wrap {
    margin: 0 auto;
    padding: 0 16px;
}

/* Player width options */
.bookness-width-boxed { max-width: 900px; }
.bookness-width-wide { max-width: 1200px; }
.bookness-width-fullwidth { max-width: 100%; width: 100%; }

/* Player wrapper */
.bookness-player-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Site logo above video */
.bookness-site-logo {
    text-align: center;
    margin-bottom: 16px;
}

.bookness-site-logo img {
    max-height: 60px;
    width: auto;
}

/* Intro message above video */
.bookness-intro-message {
    background: #f0f4ff;
    border-left: 4px solid #e8821a;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #1e293b;
    border-radius: 4px;
}

/* Progress bar */
.bookness-progress-wrap {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.bookness-progress-bar {
    height: 100%;
    background: #e8821a;
    border-radius: 3px;
    transition: width 0.3s ease;
    min-width: 0;
}

/* Final template - initially hidden */
.bookness-final-template {
    margin-top: 32px;
}

/* Unmute overlay — shown when video autoplays muted */
#bookness-unmute-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: white;
    font-size: 18px;
    text-align: center;
}

#bookness-unmute-overlay .unmute-icon {
    font-size: 64px;
    animation: booknessPulse 1.5s ease-in-out infinite;
    margin-bottom: 12px;
}

@keyframes booknessPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Replay overlay — mostrato quando il video è stato completato */
#bookness-replay-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: white;
    text-align: center;
}

.bookness-replay-icon {
    font-size: 72px;
    margin-bottom: 12px;
    animation: booknessPulse 1.5s ease-in-out infinite;
}

.bookness-replay-text {
    font-size: 20px;
    font-weight: 600;
}

/* CTA — positioned below the video player, full width */
.bookness-cta-wrap {
    text-align: center;
    margin: 24px 0;
    padding: 0;
    width: 100%;
}

.bookness-cta-btn {
    display: inline-block;
    background-color: #e8821a;
    color: #ffffff !important;
    font-size: 20px;
    font-weight: 700;
    padding: 18px 48px;
    border-radius: 6px;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: booknessPulse 2s ease-in-out infinite;
}

.bookness-cta-btn:hover {
    background-color: #cf7016;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Trigger template containers - initially hidden */
.bookness-trigger-template-content {
    margin-top: 32px;
}

/* Shipping form intro text */
.bookness-shipping-intro {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.bookness-shipping-intro h2,
.bookness-shipping-intro h3 {
    margin-top: 0;
}

.bookness-shipping-intro strong {
    color: #1a1a1a;
}

/* Shipping form */
.bookness-shipping-form {
    max-width: 600px;
    margin: 32px auto;
    padding: 32px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.bookness-shipping-form h3 {
    margin-top: 0;
    color: #1a1a1a;
    font-size: 22px;
}

.bookness-shipping-form .form-row {
    margin-bottom: 16px;
}

.bookness-shipping-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
}

.bookness-shipping-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
}

.bookness-shipping-form input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.bookness-shipping-form .form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.bookness-shipping-form .submit-btn {
    width: 100%;
    padding: 14px;
    background: #e8821a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease;
}

.bookness-shipping-form .submit-btn:hover {
    background: #cf7016;
}

.bookness-shipping-form .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.bookness-privacy-row {
    margin-top: 8px;
    margin-bottom: 16px;
}

.bookness-privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #666;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.4;
}

.bookness-privacy-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.bookness-privacy-label a {
    color: #e8821a;
    text-decoration: underline;
}

.bookness-shipping-form .success-message {
    text-align: center;
    color: #2d7a2d;
    font-size: 18px;
    font-weight: 600;
    padding: 24px;
    line-height: 1.5;
}

/* Waiting room with countdown */
.bookness-waiting-room {
    text-align: center;
    padding: 48px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.bookness-countdown-wrap {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 40px 32px;
    margin: 32px auto;
    color: white;
}

.bookness-countdown-title {
    font-size: 22px;
    margin-bottom: 32px;
    color: #fff;
}

.bookness-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.bookness-countdown-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bookness-countdown-number {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: #e8821a;
    min-width: 80px;
    display: block;
}

.bookness-countdown-separator {
    font-size: 48px;
    font-weight: 700;
    color: #e8821a;
    margin-bottom: 20px;
}

.bookness-countdown-label {
    font-size: 14px;
    color: #aaa;
    margin-top: 8px;
}

.bookness-countdown-date {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 16px;
}

.bookness-countdown-note {
    font-size: 14px;
    color: #888;
}

/* Live UI — two-column layout */
.bookness-webinar-wrap.bookness-live-ui {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 16px;
    align-items: start;
}

.bookness-live-ui .bookness-intro-message {
    font-size: 16px;
    padding: 10px 16px;
    margin-bottom: 8px;
}

.bookness-live-ui .bookness-intro-message h3 {
    font-size: 18px;
    margin: 0;
}

.bookness-webinar-sidebar {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    color: white;
    position: sticky;
    top: 20px;
    min-height: 300px;
}

.bookness-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bookness-live-badge {
    font-size: 13px;
    font-weight: 700;
    color: #ff4444;
    animation: booknessPulse 2s infinite;
}

.bookness-participants {
    font-size: 13px;
    color: #ccc;
}

.bookness-timer-wrap {
    font-size: 20px;
    font-weight: 700;
    color: #e8821a;
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
}

.bookness-timer-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.bookness-live-social-proof {
    font-size: 12px;
    color: #aaa;
    line-height: 1.5;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
}

.bookness-offer-box {
    background: rgba(232,130,26,0.15);
    border: 1px solid #e8821a;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    margin-top: 12px;
}

.bookness-offer-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.bookness-offer-btn {
    display: block;
    background: #e8821a;
    color: white !important;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.bookness-offer-btn:hover {
    background: #cf7016;
}

/* Mobile: live UI single column */
@media (max-width: 768px) {
    .bookness-webinar-wrap.bookness-live-ui {
        grid-template-columns: 1fr;
    }
    .bookness-webinar-sidebar {
        position: static;
    }
}

/* Responsive: mobile adjustments */
@media (max-width: 600px) {
    .bookness-shipping-intro {
        font-size: 14px;
        line-height: 1.5;
    }

    .bookness-shipping-intro h2 {
        font-size: 20px;
    }

    .bookness-shipping-intro h3 {
        font-size: 17px;
    }

    .bookness-shipping-form {
        padding: 20px 16px;
        margin: 20px auto;
    }

    .bookness-shipping-form h3 {
        font-size: 18px;
    }

    .bookness-shipping-form .form-row-half {
        grid-template-columns: 1fr;
    }

    .bookness-cta-btn {
        font-size: 17px;
        padding: 14px 24px;
    }

    .bookness-waiting-room {
        padding: 24px 16px;
    }

    .bookness-countdown-wrap {
        padding: 24px 16px;
    }

    .bookness-countdown-number {
        font-size: 40px;
        min-width: 56px;
    }

    .bookness-countdown-separator {
        font-size: 32px;
    }

    .bookness-countdown-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .bookness-countdown-date {
        font-size: 15px;
    }
}
