/* Clean Carousel Wizard Styles */
/* High specificity to override theme styles */
/* 100% INDEPENDENT - No theme dependencies */

/* ==========================================================================
   Wizard color source of truth
   - Change --pvc-primary once to re-theme all primary action buttons
   - Keep close/exit controls on --pvc-danger
   ========================================================================== */
.pvc-wizard-wrapper,
.wizard-modal-overlay {
    /* Core theme variables (formerly in wizard.css) */
    --bg-card: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-input: #ffffff;
    --bg-primary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-accent: #111827;
    --border-primary: #e5e7eb;
    --border-secondary: #f3f4f6;
    --border-accent: #d1d5db;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,.15);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-smooth: 0.2s ease;

    /* Source-of-truth accents */
    --pvc-primary: #5b3af1;
    --pvc-primary-hover: #4f46e5;
    --pvc-primary-disabled: rgba(91, 58, 241, 0.6);
    --pvc-primary-shadow: rgba(91, 58, 241, 0.4);
    --pvc-danger: #9d1616;
    --pvc-danger-hover: #dc3545;

    /* Backwards-compat aliases used heavily in templates */
    --accent-primary: var(--pvc-primary);
    --accent-secondary: var(--pvc-primary);
}

/* Dark mode variable definitions */
.pvc-wizard-wrapper[data-theme="dark"],
.wizard-modal-overlay[data-theme="dark"] {
    --bg-card: #0a0a0a;
    --bg-secondary: #141414;
    --bg-input: #1a1a1a;
    --bg-primary: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #808080;
    --text-accent: #ffffff;
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.05);
    --border-accent: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px rgba(0,0,0,.3);
    --shadow-md: 0 10px 25px rgba(0,0,0,.4);
    --shadow-lg: 0 20px 40px rgba(0,0,0,.5);
}

/* Top-right modal X (base styles) */
.wizard-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: all var(--transition-smooth);
}

/* Top-right modal X (keep red behavior) */
.wizard-modal-close:hover {
    background: var(--pvc-danger-hover);
    color: #ffffff;
    transform: rotate(90deg);
    border-color: var(--pvc-danger-hover);
}

/* Sidebar close button (base styles) */
.nav-close-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    width: 100%;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

/* Sidebar close button (keep red behavior) */
.nav-close-btn:hover {
    background: var(--pvc-danger-hover);
    color: #ffffff;
    border-color: var(--pvc-danger-hover);
}
.nav-close-btn:hover .nav-icon,
.nav-close-btn:hover .nav-icon i,
.nav-close-btn:hover i {
    color: #ffffff !important;
}
.nav-close-btn:active {
    background: #c82333;
    color: #ffffff;
    border-color: #c82333;
}

/* Payment Modal Styles */
.pvc-payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.pvc-payment-modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 90vh;
    max-height: 800px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dark mode for payment modal container */
.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-modal-container {
    background: #1a1a1a;
    color: #e0e0e0;
}

.pvc-payment-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #333;
    font-size: 18px;
}

.pvc-payment-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.pvc-payment-modal-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.pvc-payment-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 5;
}

.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-loading {
    background: #1a1a1a;
}

.pvc-payment-loading p {
    margin-top: 20px;
    color: #666;
    font-size: 16px;
}

.pvc-payment-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.pvc-payment-message-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.pvc-payment-message-content {
    text-align: center;
}

/* Dark theme support for payment modal */
.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-modal-container,
.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-message-container,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-modal-container,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-message-container,
.pvc-payment-message-overlay[data-theme="dark"] .pvc-payment-message-container {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Dark mode text colors for payment message content */
.pvc-payment-message-overlay[data-theme="dark"] .pvc-payment-message-content,
.pvc-payment-message-overlay[data-theme="dark"] .pvc-payment-message-content h2,
.pvc-payment-message-overlay[data-theme="dark"] .pvc-payment-message-content p,
.pvc-payment-message-overlay[data-theme="dark"] .pvc-payment-message-content div {
    color: #e0e0e0 !important;
}

.pvc-payment-message-overlay[data-theme="dark"] .pvc-payment-message-content p {
    color: #b0b0b0 !important;
}

/* Notification popup dark mode support */
.pvc-notification-popup[data-theme="dark"] {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.pvc-notification-popup[data-theme="dark"] h2,
.pvc-notification-popup[data-theme="dark"] p,
.pvc-notification-popup[data-theme="dark"] div {
    color: #e0e0e0 !important;
}

.pvc-notification-popup[data-theme="dark"] p {
    color: #b0b0b0 !important;
}

.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-modal-close,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-modal-close:hover,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-loading,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-loading {
    background: #1a1a1a;
}

.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-loading p,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-loading p {
    color: #b0b0b0;
}

/* Dark mode for WooCommerce checkout inside payment modal */
.pvc-payment-modal-overlay[data-theme="dark"] iframe,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-modal-overlay iframe {
    background: #1a1a1a;
}

/* Apply dark theme to payment modal based on wizard theme */
.pvc-payment-modal-overlay {
    /* Inherit theme from wizard */
}

.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-modal-container iframe,
.wizard-modal-overlay[data-theme="dark"] ~ .pvc-payment-modal-overlay .pvc-payment-modal-container iframe {
    background: #1a1a1a;
}

/* WooCommerce Checkout Dark Mode Styling */
.pvc-payment-modal-overlay[data-theme="dark"] .pvc-payment-modal-container,
.wizard-modal-overlay[data-theme="dark"] .pvc-payment-modal-container {
    /* Dark background already set above */
}

/* WooCommerce Checkout Block Dark Mode - Applied via iframe content */
/* Note: These styles need to be injected into the iframe or applied globally */
/* For now, we'll apply them globally and they'll affect checkout when in dark mode */

/* Dark mode for WooCommerce checkout blocks */
body[data-theme="dark"] .wc-block-checkout,
.pvc-payment-modal-overlay[data-theme="dark"] ~ * .wc-block-checkout,
html[data-theme="dark"] .wc-block-checkout {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Order Summary Styling Fixes */
.wc-block-components-order-summary-item__image {
    display: none !important;
}

.wc-block-formatted-money-amount.wc-block-components-formatted-money-amount.wc-block-components-product-price__value,
.wc-block-formatted-money-amount.wc-block-components-formatted-money-amount.wc-block-components-product-price__value.wc-block-components-order-summary-item__individual-price,
.wc-block-components-order-summary-item__individual-price {
    display: none !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__description .wc-block-components-product-metadata,
.wc-block-components-order-summary .wc-block-components-order-summary-item__description p {
    font-size: 11px !important;
}

/* Dark mode for order summary */
.pvc-payment-modal-overlay[data-theme="dark"] .wc-block-components-order-summary,
.wizard-modal-overlay[data-theme="dark"] .wc-block-components-order-summary,
body[data-theme="dark"] .wc-block-components-order-summary {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.pvc-payment-modal-overlay[data-theme="dark"] .wc-block-components-order-summary *,
.wizard-modal-overlay[data-theme="dark"] .wc-block-components-order-summary *,
body[data-theme="dark"] .wc-block-components-order-summary * {
    color: #e0e0e0 !important;
}

.pvc-payment-modal-overlay[data-theme="dark"] .wc-block-components-order-summary input,
.pvc-payment-modal-overlay[data-theme="dark"] .wc-block-components-order-summary select,
.pvc-payment-modal-overlay[data-theme="dark"] .wc-block-components-order-summary textarea,
.wizard-modal-overlay[data-theme="dark"] .wc-block-components-order-summary input,
.wizard-modal-overlay[data-theme="dark"] .wc-block-components-order-summary select,
.wizard-modal-overlay[data-theme="dark"] .wc-block-components-order-summary textarea,
body[data-theme="dark"] .wc-block-components-order-summary input,
body[data-theme="dark"] .wc-block-components-order-summary select,
body[data-theme="dark"] .wc-block-components-order-summary textarea {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Fix squished order summary */
.wc-block-components-order-summary-cart-items-block,
.wc-block-components-totals-wrapper {
    padding: 15px !important;
    margin: 10px 0 !important;
}

.wc-block-components-order-summary-item {
    padding: 10px 0 !important;
    margin-bottom: 10px !important;
}

.wc-block-components-order-summary-item__description {
    margin-top: 5px !important;
    line-height: 1.4 !important;
}

/* Import fonts if not already loaded by theme */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* Global font family - independent from theme (using aihub theme fonts) */

/* Body font - Rubik (from aihub theme) */
/* Apply to containers - Font Awesome will handle its own icons */
.wizard-modal-content,
.wizard-new-step,
.wizard-new-btn,
.wizard-new-option-card,
.wizard-new-script-textarea,
.wizard-new-ai-input,
.voice-library-section,
.music-library-section,
.brand-upload-section,
.library-info,
.track-info {
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* CRITICAL: Font Awesome icons must NOT inherit font-family from parent */
/* Font Awesome 6 CDN sets its own font-family - we just ensure it's not overridden */
/* DO NOT set font-family here - let Font Awesome CSS handle it */
/* We only ensure icons are excluded from our global font-family rules */
.fas, .far, .fab, .fal, .fad, .fa, 
[class*="fa-"], 
i[class*="fa-"],
.wizard-new-option-icon i,
.upload-icon i,
.btn-icon i,
.share-icon i {
    /* Font Awesome's own CSS will set font-family - don't override it */
    /* Just ensure these properties are set for proper rendering */
    font-style: normal !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
    line-height: 1 !important;
    text-rendering: auto !important;
}

.far, i.far {
    font-weight: 400 !important;
}

.fab, i.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Icon container - text uses Rubik, but icons inside will use Font Awesome */
.wizard-new-option-icon {
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* CRITICAL: Override theme styles for ALL headings within plugin */
/* Force plugin fonts on all h1-h6 elements to prevent theme override */
.pvc-wizard-wrapper h1,
.pvc-wizard-wrapper h2,
.pvc-wizard-wrapper h3,
.pvc-wizard-wrapper h4,
.pvc-wizard-wrapper h5,
.pvc-wizard-wrapper h6,
.wizard-modal-content h1,
.wizard-modal-content h2,
.wizard-modal-content h3,
.wizard-modal-content h4,
.wizard-modal-content h5,
.wizard-modal-content h6,
.wizard-new-container h1,
.wizard-new-container h2,
.wizard-new-container h3,
.wizard-new-container h4,
.wizard-new-container h5,
.wizard-new-container h6,
.wizard-new-step h1,
.wizard-new-step h2,
.wizard-new-step h3,
.wizard-new-step h4,
.wizard-new-step h5,
.wizard-new-step h6 {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    /* Preserve font-size from inline styles (including clamp) - don't override */
    /* font-size is set inline in template, so we don't override it here */
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: inherit !important;
}

/* Heading font - Manrope (from aihub theme) */
.wizard-new-step-title,
.wizard-new-step-description,
.wizard-new-option-name,
.wizard-new-option-hint,
.wizard-new-btn-primary,
.wizard-new-btn-generate,
.wizard-new-nav-btn {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Filter Button Selectors - Highlighted when active */
.template-filter-btn,
.aspect-filter-btn,
.template-filter-btn.active,
.aspect-filter-btn.active {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.template-filter-btn.active,
.aspect-filter-btn.active {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
}

.template-filter-btn:hover:not(.active),
.aspect-filter-btn:hover:not(.active) {
    background: #f9fafb !important;
    border-color: #6366f1 !important;
    color: #6366f1 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Icon Color - All wizard icons use #6366f1 to match step circle background */
.wizard-new-option-icon,
.wizard-new-option-icon i,
.upload-icon,
.upload-icon i,
.btn-icon,
.btn-icon i,
.share-icon,
.share-icon i {
    color: #6366f1 !important;
}

.wizard-modal-content {
    display: flex !important;
    visibility: visible !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 0;
    /* Theme block-layout rules often cap width — modal body must span full panel */
    max-width: none !important;
    width: 100% !important;
    min-height: 0 !important;
}

.wizard-modal-content:not(.fade-in) {
    opacity: 0 !important;
}

.wizard-modal-content.fade-in {
    opacity: 1 !important;
}

/* Dashboard tab fade transitions */
.dashboard-tab {
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dashboard-tab:not(.fade-in) {
    opacity: 0 !important;
}

.dashboard-tab.fade-in {
    opacity: 1 !important;
}

/* CRITICAL: Ensure active dashboard tab is always visible after login/signup */
.dashboard-tab.active.fade-in {
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* Force visibility for active tab even if fade-in is missing (fallback) */
.dashboard-tab.active[data-tab="create-new"] {
    opacity: 1 !important;
}

/* Center "No videos found" message */
.products-grid > div[style*="text-align: center"],
.products-grid > div[style*="No videos found"],
[id*="productsGrid"] > div[style*="text-align: center"],
[id*="productsGrid"] > div[style*="No videos found"],
.dashboard-tab[data-tab="all-videos"] .products-grid > div[style*="text-align: center"],
.dashboard-tab[data-tab="all-videos"] .products-grid > div[style*="No videos found"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    width: 100% !important;
    text-align: center !important;
    grid-column: 1 / -1 !important;
}

.dashboard-tab.fade-out {
    opacity: 0 !important;
}

.wizard-new-carousel-wrapper {
    width: 100%;
    max-width: min(1200px, 100%);
    margin: 0 auto;
    box-sizing: border-box;
    padding-left: clamp(4px, 2vw, 12px);
    padding-right: clamp(4px, 2vw, 12px);
}


/* Carousel Container */
.wizard-new-carousel-container {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: none !important;
    /* Content-driven height avoids giant empty flex rows when themes tweak parent flex */
    min-height: min(500px, 70vh) !important;
    max-height: none !important;
    box-sizing: border-box !important;
}

/* CSS variable to drive slide offset */
.wizard-new-carousel-container { --wizard-offset: 0%; }

.wizard-new-carousel-track {
    display: flex !important;
    flex-direction: row !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, opacity !important;
    transform: translate3d(var(--wizard-offset), 0, 0) !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Disable transition during drag for instant response */
.wizard-new-carousel-track.dragging {
    transition: none !important;
    opacity: 1 !important;
}

/* Fade effect for step transitions - smooth fade in/out during horizontal swipe */
.wizard-new-carousel-track.transitioning {
    opacity: 0.85 !important;
}

.wizard-new-carousel-track.transitioning .wizard-new-step {
    animation: fadeSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-new-step {
    min-width: 100% !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    position: relative !important;
    visibility: visible !important;
    overflow-x: clip;
}

.wizard-new-step.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure Step 7 (rendering) is always visible when active */
.wizard-new-step[data-step="7"].active,
.wizard-new-step[id*="newStep7_"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-new-step[data-step="7"] .wizard-new-step-content,
.wizard-new-step[id*="newStep7_"] .wizard-new-step-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-new-step-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.wizard-new-step.active .wizard-new-step-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/*
 * CSS-driven auto-advance using :has()
 *
 * NOTE: Disabled intentionally.
 * The carousel offset is driven by JavaScript (`goToStep()`), and these selectors
 * are not reliably scoped to the active template/step flow. Keeping them enabled
 * can cause offset conflicts and unexpected jumps.
 */
/* .wizard-new-carousel-container:has(.wizard-new-step[data-step="1"] input[name*="new_template"]:checked) {
 *     --wizard-offset: -100%;
 * }
 *
 * .wizard-new-carousel-container:has(.wizard-new-step[data-step="3"] input[name*="new_aspect"]:checked) {
 *     --wizard-offset: -300%;
 * }
 *
 * .wizard-new-carousel-container:has(.wizard-new-step[data-step="4"] input[name*="new_brand"][value="default"]:checked) {
 *     --wizard-offset: -400%;
 * }
 */

.wizard-new-step-header {
    text-align: center;
    margin-bottom: 30px;
    overflow: visible; /* Ensure step 8 loader isn't clipped */
}

.wizard-new-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

/* Step 8 Loading Animation */
/* Override the default blue background from wizard-new-step-number for step7-loader */
.wizard-new-step-number.step7-loader {
    background: transparent !important;
    border: none !important;
    overflow: visible; /* Allow content to be visible during animations */
}

.step7-loader {
    position: relative;
    transition: background 0.3s ease;
}

.step7-number {
    position: relative;
    z-index: 3;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none; /* Hide the number "7" - show spinner instead */
}

.step7-loader.loading .step7-number {
    opacity: 0;
    transform: scale(0.8);
}

/* Ensure background stays transparent during loading */
.step7-loader.loading {
    background: transparent !important;
    border: none !important;
    overflow: visible;
}

.step7-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-right-color: #6366f1;
    border-radius: 50%;
    opacity: 1; /* Show spinner immediately when step 7 loads */
    transition: opacity 0.3s ease;
    animation: step7-spin 1.0s linear infinite;
    z-index: 1; /* Always behind the checkmark */
}

.step7-loader.loading .step7-spinner {
    opacity: 1;
    /* Don't set transform here - let animation handle rotation */
}

.step7-checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    opacity: 0;
    transform: scale(0) rotate(-45deg);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    z-index: 2;
    color: white;
    stroke: white;
    fill: none;
}

/* step7-checkmark is Font Awesome fa-check (no SVG) */

.step7-loader.completed {
    background: #10b981 !important;
    border: none !important;
    animation: step7-complete-pulse 0.6s ease-out;
    overflow: visible !important; /* Ensure checkmark isn't clipped */
    /* Add padding to prevent clipping during pulse animation */
    box-sizing: border-box;
}

/* Ensure no purple background shows through */
.wizard-new-step-number.step7-loader.completed {
    background: #10b981 !important;
    border: none !important;
}

.step7-loader.completed .step7-number {
    opacity: 0;
}

.step7-loader.completed .step7-spinner {
    opacity: 0;
    animation: none;
    display: none; /* Fully hide spinner so only the green checkmark is visible */
}

/* Hide spinner when fade-out class is applied (same logic as progress bar) */
/* Hide spinner when fade-out class is applied (same logic as progress bar) - more specific selectors */
.step7-spinner.fade-out,
.wizard-new-step-header .step7-spinner.fade-out,
.step7-loader .step7-spinner.fade-out,
.wizard-new-step-number.step7-loader .step7-spinner.fade-out,
.wizard-new-step-header .step7-loader .step7-spinner.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    transform: translateY(-10px);
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    animation: none !important;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, max-height 0.8s ease-out, margin 0.8s ease-out, visibility 0.8s ease-out !important;
}

.step7-loader.completed .step7-checkmark {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

@keyframes step7-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes step7-complete-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05); /* Reduced from 1.1 to prevent clipping */
    }
    100% {
        transform: scale(1);
    }
}

.wizard-new-step-title {
    font-size: 1.75rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.wizard-new-step-description {
    font-size: 1rem;
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #797878;
    margin: 0;
    line-height: 1.5;
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.wizard-new-step-description.fade-out {
    opacity: 0 !important;
    transform: translateY(-10px);
}

.wizard-new-step-description.fade-in {
    opacity: 1 !important;
    transform: translateY(0);
}

/* Video wrapper fade-in - matches description timing and style */
/* Note: This rule is moved to after .show rule (see line ~2515) to ensure proper override */

.wizard-new-step-content {
    max-width: 800px;
    margin: 0 auto;
    min-width: 0;
}

/* Option Grid - Override any conflicting styles from wizard.css */
.wizard-new-option-grid,
.pvc-wizard-wrapper .wizard-new-option-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
    margin-top: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Audience grid - own class, 4 per row (same selector pattern as Step 1 template grid) */
/* Scoped to step 2 and ai-section so no other grid rules override */
.wizard-new-step[data-step="2"] .wizard-new-audience-grid,
.pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-audience-grid,
.wizard-new-step[data-step="2"] .wizard-new-step-content .wizard-new-audience-grid,
.pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-step-content .wizard-new-audience-grid,
.ai-section .wizard-new-audience-grid,
.pvc-wizard-wrapper .ai-section .wizard-new-audience-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 6px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 576px) {
    .wizard-new-step[data-step="2"] .wizard-new-audience-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-audience-grid,
    .wizard-new-step[data-step="2"] .wizard-new-step-content .wizard-new-audience-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-step-content .wizard-new-audience-grid,
    .ai-section .wizard-new-audience-grid,
    .pvc-wizard-wrapper .ai-section .wizard-new-audience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 992px) {
    .wizard-new-step[data-step="2"] .wizard-new-audience-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-audience-grid,
    .wizard-new-step[data-step="2"] .wizard-new-step-content .wizard-new-audience-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-step-content .wizard-new-audience-grid,
    .ai-section .wizard-new-audience-grid,
    .pvc-wizard-wrapper .ai-section .wizard-new-audience-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.wizard-new-step[data-step="2"] .wizard-new-audience-grid .wizard-new-audience-card,
.pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-audience-grid .wizard-new-audience-card,
.wizard-new-audience-grid .wizard-new-audience-card,
.pvc-wizard-wrapper .wizard-new-audience-grid .wizard-new-audience-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 24px 12px !important;
    min-height: 120px !important;
    margin: 0 !important;
}

/* Smaller typography and icons inside audience cards */
.wizard-new-audience-card .wizard-new-option-icon,
.pvc-wizard-wrapper .wizard-new-audience-card .wizard-new-option-icon {
    font-size: 1.35rem !important;
    margin-bottom: 6px !important;
}

.wizard-new-audience-card .wizard-new-option-icon i,
.pvc-wizard-wrapper .wizard-new-audience-card .wizard-new-option-icon i {
    font-size: 1.35rem !important;
}

.wizard-new-audience-card .wizard-new-option-name,
.pvc-wizard-wrapper .wizard-new-audience-card .wizard-new-option-name {
    font-size: 0.9rem !important;
    margin-bottom: 4px !important;
}

.wizard-new-audience-card .wizard-new-option-hint,
.pvc-wizard-wrapper .wizard-new-audience-card .wizard-new-option-hint {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
}

.wizard-new-step[data-step="2"] .wizard-new-ai-options .ai-label,
.pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-ai-options .ai-label {
    margin-bottom: 15px;
}

.wizard-new-script-editor .wizard-new-script-word-counter,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter {
    text-align: left;
    margin-bottom: 12px;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6d6d6d;
    line-height: 1.4;
    background: none;
    border: none;
    border-radius: 0;
}

.wizard-new-script-editor .wizard-new-script-word-counter .word-count,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter .word-count {
    font-weight: 700;
    font-size: 1.05rem;
    color: #374151;
}

.wizard-new-script-editor .wizard-new-script-word-counter .word-max,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter .word-max {
    font-weight: 700;
    font-size: 1.05rem;
    color: #6d6d6d;
}

.wizard-new-script-editor .wizard-new-script-word-counter.is-near-limit,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter.is-near-limit {
    color: #b45309;
}

.wizard-new-script-editor .wizard-new-script-word-counter.is-near-limit .word-count,
.wizard-new-script-editor .wizard-new-script-word-counter.is-near-limit .word-max,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter.is-near-limit .word-count,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter.is-near-limit .word-max {
    color: #b45309;
}

.wizard-new-script-editor .wizard-new-script-word-counter.is-at-limit,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter.is-at-limit {
    color: #991b1b;
}

.wizard-new-script-editor .wizard-new-script-word-counter.is-at-limit .word-count,
.wizard-new-script-editor .wizard-new-script-word-counter.is-at-limit .word-max,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter.is-at-limit .word-count,
.pvc-wizard-wrapper .wizard-new-script-editor .wizard-new-script-word-counter.is-at-limit .word-max {
    color: #991b1b;
}

/* Step 1: Template selection - automatically adjust to show max items per row */
.wizard-new-step[data-step="1"] .wizard-new-step-content {
    max-width: 1000px;
}

/* Step 2: Script step - same content width as Step 1 so audience grid fits 4 in a row */
.wizard-new-step[data-step="2"] .wizard-new-step-content,
.pvc-wizard-wrapper .wizard-new-step[data-step="2"] .wizard-new-step-content {
    max-width: 1000px;
}

.wizard-new-step[data-step="1"] .wizard-new-option-grid,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid,
.wizard-new-carousel-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid,
.wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 20px !important;
    display: grid !important;
    max-width: 100% !important;
}

@media (min-width: 576px) {
    .wizard-new-step[data-step="1"] .wizard-new-option-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid,
    .wizard-new-carousel-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid,
    .wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 992px) {
    .wizard-new-step[data-step="1"] .wizard-new-option-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid,
    .wizard-new-carousel-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid,
    .pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid,
    .wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.wizard-new-step[data-step="1"] .wizard-new-option-grid > .wizard-new-option-card,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-grid > .wizard-new-option-card {
    align-self: stretch !important;
    justify-content: flex-start !important;
}

.wizard-new-step[data-step="1"] .wizard-new-option-card,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-card {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 30px 20px !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Step 1: pin hint to bottom of the card so row heights stay even; keeps “Show more” aligned with templates */
.wizard-new-step[data-step="1"] .wizard-new-option-card .wizard-new-option-hint,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-card .wizard-new-option-hint {
    margin-top: auto !important;
}

/* “Show more” is a native <button> — normalize so it matches label cards */
.wizard-new-step[data-step="1"] .wizard-new-show-more-card,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card {
    font: inherit !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    min-height: 160px !important;
}

.wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-icon i,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-icon i {
    font-size: 1.875rem !important;
}

/* Bible Defense “⭐ Updated” sat between title and hint — absolute corner so card height matches other extras */
.wizard-new-step[data-step="1"] .wizard-new-option-card.recommended .wizard-new-option-recommended,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-option-card.recommended .wizard-new-option-recommended {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    margin: 0 !important;
    text-align: left !important;
}

.wizard-new-option-card,
.pvc-wizard-wrapper .wizard-new-option-card {
    background: white !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    min-height: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Step 1: Template selection - "Show more" collapse/expand
   NOTE: wizard-new.css forces .wizard-new-option-card { display:flex !important; }
   so we must also use !important here to actually hide extras. */
.wizard-new-step[data-step="1"] .wizard-new-template-extra,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-template-extra {
    display: none !important;
}

.wizard-new-step[data-step="1"] .wizard-new-template-extra.is-visible,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-template-extra.is-visible {
    display: flex !important;
    opacity: 0 !important;
    transform: translateY(16px) !important;
    transition: opacity 220ms ease, transform 220ms ease !important;
    will-change: opacity, transform;
}

.wizard-new-step[data-step="1"] .wizard-new-template-extra.is-visible.is-animated-in,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-template-extra.is-visible.is-animated-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.wizard-new-step[data-step="1"] .wizard-new-show-more-card,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card {
    border-style: dashed !important;
}

.wizard-new-step[data-step="1"] .wizard-new-show-more-card.is-fading-out,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card.is-fading-out {
    opacity: 0 !important;
    transform: translateY(10px) !important;
    transition: opacity 180ms ease, transform 180ms ease !important;
    pointer-events: none !important;
}

.wizard-new-step[data-step="1"] .wizard-new-show-more-card.is-hidden,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card.is-hidden {
    /* Must beat `.wizard-new-option-card { display:flex !important; }` */
    display: none !important;
}

/* Show more: + icon and count (5) side by side, both gold */
.wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-icon,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-icon i,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-icon i,
.wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-count,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-count {
    color: #5b3af1 !important;
}

.wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-count,
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-show-more-card .wizard-new-show-more-count {
    font-size: 36px !important;
    font-weight: bold !important;
    margin-top: -5px !important;
}

.wizard-new-option-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wizard-new-option-card:has(.wizard-new-option-radio:checked) {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Prayer Mode - Purple badge styling */
.prayer-mode-card .wizard-new-option-badge {
    background: #6366f1;
}

.wizard-new-option-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wizard-new-option-icon {
    font-size: 1.875rem;
    margin-bottom: 12px;
    line-height: 1;
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.wizard-new-option-icon i {
    color: #6366f1;
    font-size: 1.875rem;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.wizard-new-option-name {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.wizard-new-option-hint {
    font-size: 0.9rem !important;
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #888 !important;
    margin-top: 4px !important;
    line-height: 1.5 !important;
}

/* Override any other hint color rules */
.pvc-wizard-wrapper .wizard-new-option-hint,
.wizard-new-option-card .wizard-new-option-hint {
    color: #888 !important;
}

/* Recommended badge - on its own line between title and subtitle */
.wizard-new-option-recommended,
.wizard-new-option-card .wizard-new-option-recommended,
.pvc-wizard-wrapper .wizard-new-option-recommended,
.wizard-new-option-card.recommended .wizard-new-option-recommended {
    font-size: 0.75rem !important;
    color: #fec04f !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* Recommended pill is absolutely positioned on step 1; hint uses flex margin-top:auto — no special hint margin */
.wizard-new-option-card.recommended:not(.wizard-new-template-extra) .wizard-new-option-hint {
    margin-top: 4px !important;
}

.wizard-new-option-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #6366f1;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Script Editor */
.wizard-new-script-editor {
    margin-top: 24px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.wizard-new-script-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    resize: vertical;
    box-sizing: border-box;
}

.wizard-new-script-textarea:focus {
    outline: none;
    border-color: #6366f1;
}

/* CSS-only show/hide for script editor and AI options */
.wizard-new-script-editor {
    display: none;
}

.wizard-new-ai-options {
    display: none;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade animation for horizontal step transitions */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Brand Upload - CSS-only show/hide */
.wizard-new-brand-upload {
    display: none;
    margin-top: 24px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
    text-align: center;
}

/* Show brand upload when "Custom" is selected */
.wizard-new-step:has(input[name*="new_brand"][value="custom"]:checked) .wizard-new-brand-upload {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

.wizard-new-file-input {
    margin-bottom: 12px;
}

.wizard-new-upload-hint {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* Upload and Library sections (reuse original class names for styling compatibility) */
.music-upload-section,
.music-library-section,
.brand-upload-section,
.voice-library-section,
.custom-voice-section {
    display: none;
    margin-top: 24px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important; /* Remove outer scrollbar - only inner containers should scroll */
}

/* Music library section - uses same styling as other sections (voice library, upload sections) */
/* No special positioning needed - it will be centered like other dropdowns */

/* Music genre filter bubbles */
.music-library-section .theme-bubble {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.music-library-section .theme-bubble:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.music-library-section .theme-bubble:has(.music-genre-checkbox:checked) {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Subscription Plan Cards - Unified styling for all pricing cards */
.subscription-plan-card {
    text-align: justify !important;
}

.subscription-plan-card h4,
.subscription-plan-card .plan-price,
.subscription-plan-card .plan-credits,
.subscription-plan-card .plan-video-desc,
.subscription-plan-card .plan-benefits {
    text-align: center !important;
}

.subscription-plan-card .plan-features {
    text-align: left !important;
}

.subscription-plan-card .plan-features li {
    text-align: left !important;
}

.upload-instructions h4 {
    margin: 0 0 8px 0;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}
.upload-instructions .instruction-text { margin: 0 0 16px 0; color: #666; }
.recommend-note { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #e8f7ee; border: 1px solid #b7e3c4; border-radius: 12px; margin: 12px 0 16px 0; }
.recommend-icon { width: 28px; height: 28px; border-radius: 8px; background: #34c759; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.recommend-title { font-size: 0.95rem; color: #1a1a1a; }
.recommend-sub { font-size: 0.85rem; color: #666; }
.instruction-examples { display: flex; gap: 12px; margin-bottom: 12px; }
.example-item { display: flex; align-items: center; gap: 8px; }

.upload-area { border: none; border-radius: 16px; padding: 0; text-align: center; width: 100%; min-height: 180px; display: flex; align-items: stretch; justify-content: stretch; overflow: hidden; position: relative; }
.upload-label { display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; border-radius: 16px; width: 100%; height: 100%; min-height: 180px; border: 2px dashed #e0e0e0; box-sizing: border-box; background: #fafafa; }
/* Audio upload box - smaller size for step 3 (override inline styles padding: 40px 24px) */
/* Remove background from watermark info note */
.wizard-new-watermark-info-note {
    background: transparent !important;
}

/* Generate AI Script button - match red and grayed out red style */
/* Generate Script Button - Red styling with highest specificity */
button[id*="newGenerateAiScriptBtn"],
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"],
.wizard-new-btn[id*="newGenerateAiScriptBtn"],
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary,
[id*="newGenerateAiScriptBtn"].wizard-new-btn {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    color: white !important;
    border-color: var(--pvc-primary) !important;
    position: relative;
    overflow: hidden;
}

button[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]),
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]),
.wizard-new-btn[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]),
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary:not(:disabled):not([disabled]),
[id*="newGenerateAiScriptBtn"].wizard-new-btn:not(:disabled):not([disabled]) {
    opacity: 1 !important;
    cursor: pointer !important;
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
}

button[id*="newGenerateAiScriptBtn"]:disabled,
button[id*="newGenerateAiScriptBtn"][disabled],
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:disabled,
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"][disabled],
.wizard-new-btn[id*="newGenerateAiScriptBtn"]:disabled,
.wizard-new-btn[id*="newGenerateAiScriptBtn"][disabled],
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary:disabled,
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary[disabled],
[id*="newGenerateAiScriptBtn"].wizard-new-btn:disabled,
[id*="newGenerateAiScriptBtn"].wizard-new-btn[disabled] {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    color: white !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Shine animation for Generate Script button (same as other primary buttons) */
button[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled])::before,
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled])::before,
.wizard-new-btn[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled])::before,
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary:not(:disabled):not([disabled])::before,
[id*="newGenerateAiScriptBtn"].wizard-new-btn:not(:disabled):not([disabled])::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

button[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]):hover::before,
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]):hover::before,
.wizard-new-btn[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]):hover::before,
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary:not(:disabled):not([disabled]):hover::before,
[id*="newGenerateAiScriptBtn"].wizard-new-btn:not(:disabled):not([disabled]):hover::before {
    left: 100%;
}

button[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]):hover,
.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]):hover,
.wizard-new-btn[id*="newGenerateAiScriptBtn"]:not(:disabled):not([disabled]):hover,
[id*="newGenerateAiScriptBtn"].wizard-new-btn-primary:not(:disabled):not([disabled]):hover,
[id*="newGenerateAiScriptBtn"].wizard-new-btn:not(:disabled):not([disabled]):hover {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--pvc-primary-shadow);
}

/* Script title input font */
[id*="newScriptTitle"] {
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Override dark theme custom-voice-section to preserve yellow icon color */
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section .wizard-new-watermark-info-note i.fa-info-circle,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section [class*="info-note"] i.fa-info-circle,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section i.fa-info-circle[style*="color: #5b3af1"],
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section i[style*="color: #5b3af1"] {
    color: #5b3af1 !important;
}

/* Voice upload label background and padding */
label[for*="newVoiceUploadInput_"],
.audio-upload-label,
label.audio-upload-label,
.voice-upload-section .audio-upload-label,
.voice-upload-section label.audio-upload-label { 
    background: var(--bg-secondary) !important;
    padding: 40px 24px !important;
    min-height: 120px !important; 
    height: auto !important;
    max-height: none !important;
}
.audio-upload-label:hover { border-color: #6366f1 !important; background: #f8f9ff !important; }
.audio-upload-label:hover .upload-icon { transform: scale(1.1); }
.audio-upload-label .upload-text,
.audio-upload-label .upload-text strong,
.audio-upload-label .upload-text .upload-hint {
    transition: transform 0.25s ease;
}
.audio-upload-label:hover .upload-text,
.audio-upload-label:hover .upload-text strong,
.audio-upload-label:hover .upload-text .upload-hint {
    transform: scale(1.05);
}

/* Modern compact upload button style for custom branding */
.brand-upload-section .upload-label {
    min-height: auto !important;
    border: none !important;
    background: #6366f1 !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
/* Logo upload button - ensure it stays within container (override inline width: 100%) */
/* The button has classes: wizard-new-btn wizard-new-btn-primary */
label[for*="newBrandLogoInput_"],
.brand-upload-section label[for*="newBrandLogoInput_"],
.brand-upload-section label.wizard-new-btn-primary[for*="newBrandLogoInput_"],
.brand-upload-section label.wizard-new-btn[for*="newBrandLogoInput_"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
}

/* Upload Logo button hover - yellow shadow to match button color */
label[for*="newBrandLogoInput_"]:hover,
.brand-upload-section label[for*="newBrandLogoInput_"]:hover,
.brand-upload-section label.wizard-new-btn-primary[for*="newBrandLogoInput_"]:hover,
.brand-upload-section label.wizard-new-btn[for*="newBrandLogoInput_"]:hover {
    box-shadow: 0 4px 12px rgba(91, 58, 241, 0.18) !important;
}

.brand-upload-section .upload-label:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 58, 241, 0.18) !important;
}

.brand-upload-section .upload-label:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(91, 58, 241, 0.18) !important;
}
.upload-icon { 
    font-size: 2rem; 
    color: #6366f1;
}

.upload-icon i {
    color: #6366f1;
}
.upload-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.upload-hint { font-size: 0.875rem; color: #666; }
.upload-input { display: none; }
.upload-preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 16px; padding: 16px; box-sizing: border-box; }
.upload-preview img { max-height: 120px; max-width: 75%; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.upload-preview .remove-upload { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; background: #ef4444; color: #fff; border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.upload-preview .remove-upload.disabled,
.upload-preview .remove-upload[disabled] {
    opacity: 0.5;
    pointer-events: none;
}
.audio-preview audio { height: 32px; }
.remove-upload { border: none; background: #eee; border-radius: 6px; padding: 6px 10px; cursor: pointer; }

/* Spacing for "Your Logo Library" heading - 30px above */
/* Target h5 elements in brand-upload-section (the "Your Logo Library" heading) - override inline margin: 0 0 6px 0 */
.brand-upload-section h5,
.brand-upload-section > div > h5,
.brand-upload-section div h5 {
    margin-top: 30px !important;
    margin-bottom: 6px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Target the parent div containing "Your Logo Library" h5 - add margin-top to the div */
/* Use adjacent sibling selector to target div that comes after uploaded-logo-card */
.brand-upload-section .uploaded-logo-card + div {
    margin-top: 30px !important;
}
/* Target div that contains logoLibraryGrid - it's the div with margin-bottom: 16px */
.brand-upload-section > div[style*="margin-bottom: 16px"] {
    margin-top: 30px !important;
}
/* Target div that contains label with newBrandText_ - use adjacent sibling */
.brand-upload-section [id*="logoLibraryGrid_"] + div,
.brand-upload-section > div:last-child {
}

.library-info {
    border-radius: 16px !important;
}

.library-info h4 {
    margin: 0 0 8px 0;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* Additional heading overrides for specific sections */
.subscription-plan-card h4,
.subscription-plan-card h5,
.subscription-plan-card h6,
.upload-instructions h4,
.voice-library-section h4,
.music-library-section h4,
.brand-upload-section h4,
.brand-upload-section h5,
.pvc-wizard-wrapper .library-info h4,
.pvc-wizard-wrapper .library-info h5 {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}
.library-info .instruction-text { margin: 0 0 16px 0; color: #666; }

/* Ensure credits sections have consistent border radius matching theme */
.credits-share-section .library-info,
.credits-topup-section .library-info,
.credits-upgrade-section .library-info,
.credits-refer-section .library-info {
    border-radius: 16px !important;
}

/* Music Library - ensure consistent border radius matching theme */
.music-library-list-section .library-info,
.music-library-player-section {
    border-radius: 16px !important;
}

.music-library-player-section {
    border-radius: 16px !important;
}
.music-library-grid,
.custom-voices-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

/* Voice Library - Scrollable list */
.voice-library-scrollable {
    max-height: 200px; /* Slightly taller (was 140px, original was 280px) */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.voice-library-scrollable::-webkit-scrollbar {
    width: 8px;
}

.voice-library-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.voice-library-scrollable::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.voice-library-scrollable::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Smaller text for voice library section (Step 3) - font-size removed per user request */

.voice-library-section .library-info h4 {
    font-size: 1rem !important;
    margin-bottom: 8px;
}

.voice-library-section .library-info .instruction-text {
    font-size: 0.8rem !important;
}

.voice-library-section .library-track .track-title,
.voice-library-section .library-track .track-name {
    font-size: 0.85rem !important;
    font-weight: 600;
}

.voice-library-section .library-track .track-meta {
    font-size: 0.75rem !important;
}

.voice-library-section .library-track .track-credits {
    font-size: 0.8rem !important;
}

/* Voice Library - Compact Dropdown Design */
.voice-library-compact {
    padding: 0;
}

.voice-select-wrapper {
    position: relative;
}

.voice-select-dropdown {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.voice-select-dropdown:hover {
    border-color: #6366f1;
}

.voice-select-dropdown:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.voice-preview-btn-small {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    transition: all 0.2s;
}

.voice-preview-btn-small:hover {
    background: #6366f1;
    color: white;
}

.voice-preview-btn-small.playing {
    background: #ef4444;
    color: white;
}

.browse-all-voices-btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6366f1;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.browse-all-voices-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Voice Library Modal */
.voice-library-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

.voice-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.voice-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.voice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.voice-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.voice-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.voice-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.voice-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.voice-modal-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.voice-modal-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.voice-modal-card.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wizard-modal-overlay[data-theme="dark"] .voice-modal-card.selected .voice-modal-card-name,
.pvc-wizard-wrapper[data-theme="dark"] .voice-modal-card.selected .voice-modal-card-name {
    color: #ffffff !important;
}

.voice-modal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.voice-modal-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    flex: 1;
}

.voice-modal-card.voice-premium {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(255, 251, 235, 0.5);
}

.voice-modal-card-actions {
    display: flex;
    gap: 8px;
}

.voice-preview-btn-modal,
.voice-select-btn-modal {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #333;
}

.voice-preview-btn-modal:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.voice-preview-btn-modal.playing {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.voice-select-btn-modal {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.voice-select-btn-modal:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}

/* Music library section - match voice library exactly */
.music-library-section h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600;
    color: #333;
}

.music-library-section .instruction-text {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.music-library-section .music-continue-button-wrapper {
    margin-top: 24px;
    text-align: center;
}
.library-track { 
    display: grid; 
    grid-template-columns: auto 1fr auto; 
    align-items: center; 
    gap: 16px; 
    padding: 14px 16px; 
    border: 1px solid #e0e0e0; 
    border-radius: 10px; 
    cursor: pointer; 
    min-height: 60px; 
    position: relative; 
    transition: all 0.2s ease; 
    background: white;
}

/* Custom Branding Logo Library - specific padding and margin */
.brand-upload-section .library-track,
[id*="logoLibraryGrid_"] .library-track {
    padding: 0px 16px;
    margin-bottom: 7px;
}

/* Modern Sleek Voice Card Design */
/* Voice slider styles - Modern horizontal product slider showing 4-5 cards */
.voice-slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}

.voice-slider-wrapper {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    width: 100%;
    max-height: none !important;
    max-width: 100%;
    scroll-snap-type: x proximity;
}

.voice-slider-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.voice-slider-wrapper.active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    user-select: none;
}

.voice-slider-track {
    display: flex !important;
    gap: 16px;
    padding: 16px 0;
    width: max-content;
    flex-wrap: nowrap;
}

.voice-slider-track .voice-card {
    flex: 0 0 auto !important;
    margin: 0 !important;
    scroll-snap-align: start;
}

.voice-slider-nav {
    transition: all 0.2s ease;
}

.voice-slider-nav:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.voice-library-section .voice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    gap: 12px;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 0 0 1px rgba(0, 0, 0, 0.02);
}

/* Gradient bar ONLY for premium voice items (ElevenLabs) */
.voice-library-section .voice-card.voice-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* No gradient bar for free voice items (Azure) */
.voice-library-section .voice-card:not(.voice-premium)::before {
    display: none !important;
}

.voice-library-section .voice-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.voice-library-section .voice-card:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.voice-library-section .voice-card:hover::before {
    display: none !important;
}

.voice-library-section .voice-card:hover::after {
    display: none !important;
}

.voice-library-section .voice-card.selected {
    border-color: #5b3af1 !important;
    background: rgba(91, 58, 241, 0.12) !important;
    box-shadow: 0 0 0 2px rgba(91, 58, 241, 0.18) !important;
    transform: translateY(-2px);
}

/* Selected: no gradient text; dark theme = white name, light theme = readable dark text */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="dark"] .voice-library-section .voice-card.selected .voice-name {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="light"] .voice-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="light"] .voice-library-section .voice-card.selected .voice-name {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #111827 !important;
    color: #111827 !important;
}

.voice-library-section .voice-card.selected::before {
    transform: scaleX(1);
    height: 4px;
}

/* Premium voice card selected state - coral-gold gradient border */
.voice-library-section .voice-card.voice-premium.selected {
    border-color: #5b3af1 !important;
    background: linear-gradient(135deg, rgba(91, 58, 241, 0.12) 0%, rgba(91, 58, 241, 0.12) 100%) !important;
    transform: translateY(-2px);
}

.voice-library-section .voice-card.voice-premium.selected::before {
    display: none !important;
}

.voice-library-section .voice-card.voice-premium {
    border-color: rgba(251, 191, 36, 0.5) !important;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.9) 0%, rgba(254, 243, 199, 0.6) 100%) !important;
    position: relative;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15), 0 0 0 1px rgba(251, 191, 36, 0.1) inset !important;
}

.voice-library-section .voice-card.voice-premium::before {
    display: none !important;
}

.voice-library-section .voice-card.voice-premium:hover::before {
    display: none !important;
}

.voice-library-section .voice-card.voice-premium:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}

.voice-library-section .voice-card.voice-premium.selected {
    border-color: #5b3af1 !important;
    background: rgba(91, 58, 241, 0.12) !important;
    box-shadow: 0 0 0 2px rgba(91, 58, 241, 0.18) !important;
}

.voice-library-section .voice-card-content {
    flex: 1;
    min-width: 0;
}

.voice-library-section .voice-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.voice-library-section .voice-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.voice-library-section .voice-description {
    font-size: 0;
    line-height: 1;
    display: block;
    margin: 0;
    padding: 0;
}

.voice-library-section .voice-description::before {
    content: '';
    display: none;
}

/* Music library - show category in voice-description */
.music-library-section .voice-description {
    font-size: 0.75rem !important;
    color: #666 !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
    display: block !important;
}

.voice-library-section .voice-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6366f1;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-radius: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
    position: relative;
    z-index: 2;
}


.voice-library-section .voice-card-footer {
    margin-top: auto;
    padding-top: 0;
    border-top: none;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.voice-library-section .voice-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.voice-library-section .voice-preview-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.voice-library-section .voice-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.voice-library-section .voice-preview-btn:hover::before {
    left: 100%;
}

.voice-library-section .voice-preview-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.voice-library-section .voice-preview-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border-color: #dc2626 !important;
    animation: voicePulse 2s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.voice-library-section .voice-preview-btn.playing:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.voice-library-section .voice-preview-btn.playing i {
    color: white !important;
}

@keyframes voicePulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 6px 24px rgba(239, 68, 68, 0.6);
    }
}

/* Music preview button - match voice preview button exactly */
.music-library-section .music-preview-btn,
.voice-library-section .music-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.music-library-section .music-preview-btn::before,
.voice-library-section .music-preview-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.music-library-section .music-preview-btn:hover,
.voice-library-section .music-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.music-library-section .music-preview-btn:hover::before,
.voice-library-section .music-preview-btn:hover::before {
    left: 100%;
}

.music-library-section .music-preview-btn:active,
.voice-library-section .music-preview-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.music-library-section .music-preview-btn.playing,
.voice-library-section .music-preview-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border-color: #dc2626 !important;
    animation: voicePulse 2s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.music-library-section .music-preview-btn.playing:hover,
.voice-library-section .music-preview-btn.playing:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.music-library-section .music-preview-btn.playing i,
.voice-library-section .music-preview-btn.playing i {
    color: white !important;
}

/* Idle preview: never inherit row/selected tint — stays white/gray until .playing (fixes ugly state after "Use this song") */
.music-library-section .library-track .music-preview-btn:not(.playing),
.music-library-section .library-track .voice-preview-btn.music-preview-btn:not(.playing),
.music-library-section .voice-card .music-preview-btn:not(.playing),
.music-library-section .voice-card .voice-preview-btn.music-preview-btn:not(.playing) {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
    animation: none !important;
}

.music-library-section .library-track .music-preview-btn:not(.playing):hover,
.music-library-section .library-track .voice-preview-btn.music-preview-btn:not(.playing):hover,
.music-library-section .voice-card .music-preview-btn:not(.playing):hover,
.music-library-section .voice-card .voice-preview-btn.music-preview-btn:not(.playing):hover {
    background: #f5f5f5 !important;
    color: #333333 !important;
    border-color: #d0d0d0 !important;
}

/* Dark theme: idle preview stays gold (same as wizard.css voice-preview-btn), not washed by row selection */
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .music-preview-btn:not(.playing),
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .voice-preview-btn.music-preview-btn:not(.playing),
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .music-preview-btn:not(.playing),
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .voice-preview-btn.music-preview-btn:not(.playing) {
    background: #5b3af1 !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    animation: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .music-preview-btn:not(.playing):hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .voice-preview-btn.music-preview-btn:not(.playing):hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .music-preview-btn:not(.playing):hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .voice-preview-btn.music-preview-btn:not(.playing):hover {
    background: #fdb44b !important;
    color: #000000 !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .music-preview-btn:not(.playing) i,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .voice-preview-btn.music-preview-btn:not(.playing) i,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .music-preview-btn:not(.playing) i,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .voice-preview-btn.music-preview-btn:not(.playing) i,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .music-preview-btn:not(.playing) span,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track .voice-preview-btn.music-preview-btn:not(.playing) span,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .music-preview-btn:not(.playing) span,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card .voice-preview-btn.music-preview-btn:not(.playing) span {
    color: #000000 !important;
}

.voice-library-section .voice-preview-btn i {
    font-size: 0.7rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: black !important;
}

.voice-library-section .voice-preview-text {
    color: black !important;
}

.voice-library-section .voice-preview-btn:hover .voice-preview-icon {
    transform: scale(1.15) rotate(5deg);
}

.voice-library-section .voice-preview-text {
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* Voice Library Grid - Modern spacing */
/* Voice Library - Horizontal slider only (removed old grid styles) */
.voice-library-section .music-library-grid {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 0 !important;
}

/* Voice Library Container - Removed old styles */
.voice-library-section .music-library-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.voice-library-section .library-info {
    margin-bottom: 24px;
}

.voice-library-section .library-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.voice-library-section .library-info .instruction-text {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    font-weight: 500;
}

/* Old music library grid styles removed - now using voice-card flex layout */

/* Track player controls */
.track-player-controls {
    width: 100%;
}

.track-seek-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin-top: 2px;
}

.track-seek-bar {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.track-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.track-seek-bar::-webkit-slider-thumb:hover {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.track-seek-bar::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.track-seek-bar::-moz-range-thumb:hover {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.track-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
    margin-top: 0;
    line-height: 1.2;
}

.track-current-time,
.track-total-time {
    font-variant-numeric: tabular-nums;
}
/* Music library tracks - EXACT same styling as voice cards */
.music-library-section .voice-card,
.music-library-section .library-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    gap: 12px;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 0 0 1px rgba(0, 0, 0, 0.02);
}

.music-library-section .voice-card-content {
    flex: 1;
    min-width: 0;
}

.music-library-section .voice-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.music-library-section .voice-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.music-library-section .voice-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6366f1;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-radius: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
    position: relative;
    z-index: 2;
}

.music-library-section .voice-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.music-library-section .voice-preview-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.music-library-section .voice-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.music-library-section .voice-preview-btn:hover::before {
    left: 100%;
}

.music-library-section .voice-preview-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.music-library-section .voice-preview-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border-color: #dc2626 !important;
    animation: voicePulse 2s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.music-library-section .voice-preview-btn.playing:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.music-library-section .voice-preview-btn.playing i {
    color: white !important;
}

.music-library-section .voice-preview-btn i {
    font-size: 0.7rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-library-section .voice-card::before,
.music-library-section .library-track::before {
    display: none !important;
}

.music-library-section .voice-card::after,
.music-library-section .library-track::after {
    display: none !important;
}

.music-library-section .voice-card:hover,
.music-library-section .library-track:hover { 
    border-color: rgba(255, 255, 255, 0.25) !important; 
    transform: translateY(-2px) !important; 
    box-shadow: none !important;
}

.music-library-section .voice-card.selected,
.music-library-section .library-track.selected { 
    border-color: #5b3af1 !important; 
    box-shadow: 0 0 0 2px rgba(91, 58, 241, 0.18) !important;
    transform: translateY(-2px);
    background: rgba(91, 58, 241, 0.12) !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.selected .voice-name,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track.selected .voice-name,
.pvc-wizard-wrapper[data-theme="dark"] .music-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="dark"] .music-library-section .library-track.selected .voice-name {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="light"] .music-library-section .voice-card.selected .voice-name,
.wizard-modal-overlay[data-theme="light"] .music-library-section .library-track.selected .voice-name,
.pvc-wizard-wrapper[data-theme="light"] .music-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="light"] .music-library-section .library-track.selected .voice-name {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #111827 !important;
    color: #111827 !important;
}

/* Fallback for other library-track instances */
.library-track:hover { 
    transform: translateY(-1px); 
}
.library-track.selected { 
    border-color: #5b3af1 !important; 
}
.play-preview { 
    border: none; 
    background: transparent; 
    width: auto; 
    height: auto; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    padding: 0;
    margin: 0;
}
.play-preview .play-icon {
    color: white;
    font-size: 36px;
    margin-left: 2px;
    line-height: 1;
}

.play-preview .play-icon i {
    color: white;
}

.play-preview:hover { 
    /* No hover effect */
}
.play-preview.playing { 
    background: transparent !important; 
    border: none !important;
    box-shadow: none !important;
}
.play-preview.playing .play-icon {
    color: white !important;
}

.play-preview.playing .play-icon i {
    color: white !important;
}
.track-info { flex: 1; }
.track-info .track-title { font-weight: 600; }
.track-info .track-meta { font-size: 0.875rem; color: #666; }
.track-credits {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    white-space: nowrap;
    text-align: center;
}
.track-credits.wizard-new-option-badge {
    background: #6366f1;
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Voice Library Container - ALWAYS VISIBLE GRAY SCROLLBAR */
.voice-library-container,
.voice-library-section .voice-library-container,
.voice-library-section [class*="voice-library"],
.voice-library-section [class*="library-container"] {
    max-height: calc(((60px * 4) + (12px * 3) + 24px) * 0.7); /* Slightly taller (was 150px, now ~210px, original was 300px) */
    overflow-y: scroll !important; /* CRITICAL: Always show scrollbar */
    overflow-x: hidden !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    scrollbar-gutter: stable !important; /* Reserve space for scrollbar to prevent layout shift */
    scrollbar-width: auto !important; /* Firefox: always show scrollbar (not thin, use auto for better visibility) */
    scrollbar-color: #808080 #d0d0d0 !important; /* Firefox: darker gray thumb (#808080) and light gray track (#d0d0d0) - ALWAYS VISIBLE */
}

/* WebKit browsers (Chrome, Safari, Edge) - ALWAYS VISIBLE GRAY SCROLLBAR */
.voice-library-container::-webkit-scrollbar,
.voice-library-section .voice-library-container::-webkit-scrollbar,
.voice-library-section [class*="voice-library"]::-webkit-scrollbar,
.voice-library-section [class*="library-container"]::-webkit-scrollbar {
    width: 12px !important; /* Wider for better visibility */
    display: block !important; /* CRITICAL: Always show scrollbar */
    -webkit-appearance: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.voice-library-container::-webkit-scrollbar-track,
.voice-library-section .voice-library-container::-webkit-scrollbar-track,
.voice-library-section [class*="voice-library"]::-webkit-scrollbar-track,
.voice-library-section [class*="library-container"]::-webkit-scrollbar-track {
    background: #d0d0d0 !important; /* Light gray track - ALWAYS VISIBLE */
    border-radius: 6px !important;
    -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.15) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.voice-library-container::-webkit-scrollbar-thumb,
.voice-library-section .voice-library-container::-webkit-scrollbar-thumb,
.voice-library-section [class*="voice-library"]::-webkit-scrollbar-thumb,
.voice-library-section [class*="library-container"]::-webkit-scrollbar-thumb {
    background: #808080 !important; /* Darker gray thumb - ALWAYS VISIBLE */
    border-radius: 6px !important;
    min-height: 40px !important; /* Ensure thumb is always visible */
    -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3) !important;
    border: 2px solid #d0d0d0 !important; /* More visible border */
    visibility: visible !important;
    opacity: 1 !important;
}

.voice-library-container::-webkit-scrollbar-thumb:hover,
.voice-library-section .voice-library-container::-webkit-scrollbar-thumb:hover,
.voice-library-section [class*="voice-library"]::-webkit-scrollbar-thumb:hover,
.voice-library-section [class*="library-container"]::-webkit-scrollbar-thumb:hover {
    background: #666666 !important; /* Even darker gray on hover */
}

.voice-continue-button-wrapper {
    margin-top: 24px;
}

.voice-continue-button-wrapper .wizard-new-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Make emoji in voice and music continue buttons 2x bigger */
[id*="voiceContinueBtn"]::first-letter,
[id*="musicContinueBtn"]::first-letter {
    font-size: 2rem;
    line-height: 1;
    display: inline-block;
}

.voice-continue-button-wrapper .wizard-new-btn:disabled {
    background: #e2e8f0 !important;
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 1;
}

.voice-continue-button-wrapper .wizard-new-btn:disabled:hover {
    background: #e2e8f0 !important;
    color: #64748b !important;
    transform: none;
    box-shadow: none;
}

/* Render Actions Buttons */
.render-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.render-actions .wizard-new-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.render-actions .wizard-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Render Progress and Status Animations */
.render-header {
    max-height: 100px;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, max-height 0.8s ease-out, margin 0.8s ease-out;
    overflow: hidden;
}

.render-progress {
    max-height: 50px;
    min-height: 10px !important;
    height: 10px !important;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, max-height 0.8s ease-out, margin 0.8s ease-out;
    overflow: hidden;
    box-sizing: border-box;
    /* Visible track so 0% and fast completes still read as a progress UI */
    background: rgba(15, 23, 42, 0.14) !important;
    border-radius: 999px !important;
    border: none !important;
    box-shadow: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .render-progress:not(.fade-out),
.pvc-wizard-wrapper[data-theme="dark"] .render-progress:not(.fade-out) {
    background: rgba(255, 255, 255, 0.12) !important;
}

.render-status {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, max-height 0.8s ease-out, margin 0.8s ease-out;
    font-size: 1.0rem;
    color: rgb(121, 120, 120);
}

.render-progress-bar {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    min-height: 10px;
    height: 100%;
    display: block;
    border-radius: 999px;
}

.wizard-modal-overlay[data-theme="dark"] .render-progress-bar:not(.fade-out),
.pvc-wizard-wrapper[data-theme="dark"] .render-progress-bar:not(.fade-out) {
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%) !important;
}

.render-progress-bar.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
}

.render-header.fade-out,
.render-header.fade-out *,
.render-progress.fade-out,
.render-progress.fade-out *,
.render-status.fade-out,
.render-status.fade-out *,
.film-strip-container.fade-out,
.film-strip-container.fade-out * {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px);
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: none !important;
}

.film-strip-container.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px);
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: none !important;
}

/* Responsive Video Player */
.render-player {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    margin-bottom: 32px;
}

.render-player[style*="display: none"] {
    display: none !important;
}

.render-player:not([style*="display: none"]) {
    display: block;
}

.render-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    z-index: 1; /* Ensure video is below play button overlay (z-index: 10) */
}

/* Ensure play button overlay is always visible and above video - match test.php */
.render-player .play-button-overlay,
.video-player-container .play-button-overlay,
[id*="renderPlayer_"] .play-button-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Base styles for play button overlay - ensure it's visible by default */
.render-player .play-button-overlay,
.video-player-container .play-button-overlay,
[id*="renderPlayer_"] .play-button-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    cursor: pointer !important;
    transition: opacity 0.3s ease, transform 0.2s ease !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important;
}

/* Play button circle - smaller size (30px background circle) */
.render-player .play-button-circle,
.video-player-container .play-button-circle,
[id*="renderPlayer_"] .play-button-circle {
    width: 30px !important;
    height: 30px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.render-player .play-button-overlay:hover .play-button-circle,
.video-player-container .play-button-overlay:hover .play-button-circle,
[id*="renderPlayer_"] .play-button-overlay:hover .play-button-circle {
    transform: scale(1.1) !important;
    background: rgba(255, 255, 255, 1) !important;
}

/* Play button icon - proportional to 30px circle */
.render-player .play-button-icon,
.video-player-container .play-button-icon,
[id*="renderPlayer_"] .play-button-icon {
    width: 0 !important;
    height: 0 !important;
    border-left: 10px solid #333 !important;
    border-top: 6px solid transparent !important;
    border-bottom: 6px solid transparent !important;
    margin-left: 3px !important;
}

/* Hidden state - only controlled by .hidden class */
.render-player .play-button-overlay.hidden,
.video-player-container .play-button-overlay.hidden,
[id*="renderPlayer_"] .play-button-overlay.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    /* Don't set display: none as it conflicts with positioning */
}

/* Playing state - also hide play button */
.render-player.playing .play-button-overlay,
.video-player-container.playing .play-button-overlay,
[id*="renderPlayer_"].playing .play-button-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure play button overlay works with r2VideoPlayer video elements - match r2-video-player */
/* The play button overlay is a sibling of the video element inside renderPlayer container */
[id*="renderPlayer_"] .play-button-overlay,
[id*="renderPlayer_"]:has([id*="r2VideoPlayer"]) .play-button-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure renderPlayer container has position relative for absolute positioning */
[id*="renderPlayer_"],
[id*="pvc-step7-video-container_"] {
    position: relative !important;
}

/* ====================================================================
   PVC Step 7 Video Player - Unique IDs for Easy Reference
   Search for "pvc-step7-video-wrapper" to find this section
   ==================================================================== */

/* Main wrapper - smooth fade-in animation when video is ready */
/* PVC Step 7 Video Wrapper - Grayscale to match Step 3 voiceover */
.pvc-step7-video-wrapper {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    max-width: 100%;
    box-sizing: border-box;
}

/* PVC Step 7 Video Wrapper - Ensure grayscale background when shown */
/* Note: .fade-in class overrides opacity/transform when both are present (see rule below) */
.pvc-step7-video-wrapper.show,
.pvc-step7-video-wrapper[style*="display: block"],
[id*="pvc-step7-video-wrapper"][style*="display: block"] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background: #181818 !important;
    /* border: 1px solid #e0e0e0; */
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 25px !important;
}

/* Video wrapper fade-in - matches description timing and style */
/* CRITICAL: This rule comes AFTER .show rule to override it when both classes are present */
/* The transition property is defined in base .pvc-step7-video-wrapper class (line 2492) */
.pvc-step7-video-wrapper.fade-in,
.pvc-step7-video-wrapper.fade-in.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    /* Transition is inherited from base .pvc-step7-video-wrapper class: 1.2s ease-out */
}

/* Render-card fade-in - matches description and video wrapper timing exactly */
.render-card.video-render-wrapper {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    max-width: 100%;
    box-sizing: border-box;
}

.render-card.video-render-wrapper.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Video container - always 16:9 */
.pvc-step7-video-container {
    position: relative;
    padding-bottom: 58.25%; /* Adjusted aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    cursor: pointer;
}

.pvc-step7-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    object-fit: contain;
}

/* Play button overlay - larger size for pvc-step7 */
.pvc-step7-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

/* Play button circle - larger size for pvc-step7 (override old 30px size) */
.pvc-step7-play-button .play-button-circle {
    width: 60px !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.pvc-step7-play-button:hover .play-button-circle {
    transform: scale(1.1) !important;
    background: rgba(255, 255, 255, 1) !important;
}

/* Play button icon - proportional to 60px circle */
.pvc-step7-play-button .play-button-icon {
    width: 0 !important;
    height: 0 !important;
    border-left: 20px solid #333 !important;
    border-top: 12px solid transparent !important;
    border-bottom: 12px solid transparent !important;
    margin-left: 6px !important;
}

.pvc-step7-play-button.hidden {
    opacity: 0;
    pointer-events: none;
}

.pvc-step7-video-container.playing .pvc-step7-play-button {
    opacity: 0;
    pointer-events: none;
}

/* Video info section - grayscale to match Step 3 voiceover */
.pvc-step7-video-info {
    border-color: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(107,114,128,0.05) !important; /* Grayscale, no blue */
    margin-top: 20px;
    border-radius: 12px;
}

/* Video action pills — match My Videos Share/Download (used in grid + Step 7 completion) */
.pvc-video-action-pill,
.pvc-wizard-wrapper .pvc-video-action-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    padding: 6px 12px !important;
    border-radius: 44px !important;
    background: #f9fafb !important;
    border: 1px solid rgba(209, 213, 219, 0.9) !important;
    white-space: nowrap !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
}

a.pvc-video-action-pill,
a.pvc-video-action-pill:visited {
    color: #1f2937 !important;
}

.pvc-video-action-pill:hover,
.pvc-wizard-wrapper .pvc-video-action-pill:hover {
    background: #f3f4f6 !important;
    border-color: rgba(156, 163, 175, 0.95) !important;
    color: #111827 !important;
}

.pvc-video-action-pill:active,
.pvc-wizard-wrapper .pvc-video-action-pill:active {
    transform: scale(0.98);
}

.pvc-video-action-pill--danger,
.pvc-wizard-wrapper .pvc-video-action-pill--danger {
    color: #b91c1c !important;
    background: #fef2f2 !important;
    border: 1px solid rgba(248, 113, 113, 0.7) !important;
}

.pvc-video-action-pill--danger:hover,
.pvc-wizard-wrapper .pvc-video-action-pill--danger:hover {
    background: #fee2e2 !important;
    border-color: rgba(239, 68, 68, 0.85) !important;
    color: #991b1b !important;
}

/* My Videos: 8px on Download / Share / Delete — include button + a so specificity ties modal-wide button rule */
.pvc-wizard-wrapper .history-video-card button.history-video-action.pvc-video-action-pill,
.wizard-modal-content .history-video-card button.history-video-action.pvc-video-action-pill,
.pvc-wizard-wrapper .history-video-card a.history-video-action.pvc-video-action-pill,
.wizard-modal-content .history-video-card a.history-video-action.pvc-video-action-pill {
    border-radius: 8px !important;
    -webkit-border-radius: 8px !important;
    -moz-border-radius: 8px !important;
}

/* My Scripts: copy / delete — same 8px radius as My Videos actions */
.history-script-card .script-copy-btn,
.history-script-card .script-delete-btn {
    border-radius: 8px !important;
}

/* Step 7 actions: 2×2 grid, larger type, rectangular (match My Videos feel) */
.pvc-step7-video-actions.pvc-step7-video-actions-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 15px !important;
    width: 100% !important;
    align-items: stretch !important;
}

@media (min-width: 480px) {
    .pvc-step7-video-actions.pvc-step7-video-actions-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

.pvc-step7-video-actions.pvc-step7-video-actions-grid .pvc-video-action-pill,
.pvc-step7-video-actions.pvc-step7-video-actions-grid a.pvc-video-action-pill {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    padding: 11px 14px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    text-align: center !important;
}

/* Step 7 completion: tinted actions on dark video card (default — matches dark player chrome) */
.pvc-step7-video-info .pvc-step7-btn-download {
    background: rgba(37, 99, 235, 0.18) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
    color: #dbeafe !important;
}

.pvc-step7-video-info .pvc-step7-btn-download:hover {
    background: rgba(37, 99, 235, 0.28) !important;
    border-color: rgba(147, 197, 253, 0.55) !important;
    color: #eff6ff !important;
}

.pvc-step7-video-info .pvc-step7-btn-myvideos {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #e5e7eb !important;
}

.pvc-step7-video-info .pvc-step7-btn-myvideos:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: #f9fafb !important;
}

.pvc-step7-video-info .pvc-step7-btn-share {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #cbd5e1 !important;
}

.pvc-step7-video-info .pvc-step7-btn-share:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    border-color: rgba(147, 197, 253, 0.5) !important;
    color: #f1f5f9 !important;
}

/* :visited on .pvc-video-action-pill uses dark text; beat it so Share label stays visible on dark Step 7 card */
.pvc-step7-video-info a.pvc-step7-btn-share:link,
.pvc-step7-video-info a.pvc-step7-btn-share:visited {
    color: #e2e8f0 !important;
}

.pvc-step7-video-info .pvc-step7-btn-startover {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(252, 211, 77, 0.35) !important;
    color: #fde68a !important;
}

.pvc-step7-video-info .pvc-step7-btn-startover:hover {
    background: rgba(251, 191, 36, 0.16) !important;
    border-color: rgba(253, 224, 71, 0.45) !important;
    color: #fef3c7 !important;
}

/* Light wizard theme: pastel buttons on Step 7 (overrides dark-card defaults above) */
.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-download,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-download {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-download:hover,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-download:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-myvideos,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-myvideos {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-myvideos:hover,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-myvideos:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-share,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-share {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: #c7d2fe !important;
    color: #3730a3 !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-share:hover,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-share:hover {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: #a5b4fc !important;
    color: #312e81 !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info a.pvc-step7-btn-share:link,
.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info a.pvc-step7-btn-share:visited,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info a.pvc-step7-btn-share:link,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info a.pvc-step7-btn-share:visited {
    color: #3730a3 !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-startover,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-startover {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}

.wizard-modal-overlay[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-startover:hover,
.pvc-wizard-wrapper[data-theme="light"] .pvc-step7-video-info .pvc-step7-btn-startover:hover {
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
    color: #92400e !important;
}

/* Step 7 row: equal-width pills, allow two-line labels (non-grid fallbacks) */
.pvc-step7-video-actions .pvc-video-action-pill {
    white-space: normal !important;
    text-align: center !important;
}

/* Action buttons */
.pvc-step7-action-button {
    position: relative;
    overflow: visible;
    pointer-events: auto !important;
    z-index: 100 !important;
}

/* Progress messages - white text with orange percentage */

.render-status strong,
[id*="renderStatus"] strong {
    color: #5b3af1 !important;
}

/* Ensure play button circle and icon are visible */
.render-player .play-button-circle,
.video-player-container .play-button-circle,
[id*="renderPlayer_"] .play-button-circle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 64px !important;
    height: 64px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Render / Step 7 action buttons use .pvc-video-action-pill (shared hover above) */
.render-action-btn {
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative;
}

.render-player.show {
    animation: fadeInUp 0.6s ease-out;
    display: block !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Simple CSS reset - force step 1 when modal is closed */
.wizard-modal-overlay:not(.active) .wizard-new-carousel-container {
    --wizard-offset: 0% !important;
}

/* Music Library Container - Match voice library exactly */
.music-library-container {
    max-height: calc(((60px * 4) + (12px * 3) + 24px) * 0.7); /* Slightly taller (was 150px, now ~210px, original was 300px) */
    overflow-y: scroll !important; /* CRITICAL: Always show scrollbar (not auto) */
    overflow-x: hidden !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    scrollbar-gutter: stable !important; /* Reserve space for scrollbar */
    scrollbar-width: auto !important; /* Firefox: always show scrollbar */
    scrollbar-color: #808080 #d0d0d0 !important; /* Firefox: darker gray thumb (#808080) and light gray track (#d0d0d0) - ALWAYS VISIBLE */
}

.music-library-container::-webkit-scrollbar {
    width: 12px !important; /* Wider for better visibility */
    display: block !important; /* CRITICAL: Always show scrollbar */
    -webkit-appearance: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.music-library-container::-webkit-scrollbar-track {
    background: #d0d0d0 !important; /* Light gray track - ALWAYS VISIBLE */
    border-radius: 6px !important;
    -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.15) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.music-library-container::-webkit-scrollbar-thumb {
    background: #808080 !important; /* Darker gray thumb - ALWAYS VISIBLE */
    border-radius: 6px !important;
    min-height: 40px !important; /* Ensure thumb is always visible */
    -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3) !important;
    border: 2px solid #d0d0d0 !important; /* More visible border */
    visibility: visible !important;
    opacity: 1 !important;
}

.music-library-container::-webkit-scrollbar-thumb:hover {
    background: #666666 !important; /* Even darker gray on hover */
}

.music-continue-button-wrapper {
    margin-top: 24px;
}

.music-continue-button-wrapper .wizard-new-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.music-continue-button-wrapper .wizard-new-btn:disabled {
    background: #e2e8f0 !important;
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 1;
}

.music-continue-button-wrapper .wizard-new-btn:disabled:hover {
    background: #e2e8f0 !important;
    color: #64748b !important;
    transform: none;
    box-shadow: none;
}

/* CSS-only show/hide for music sections (works with template instances) */
.wizard-new-step:has(input[name$="_music"][value="upload"]:checked) .music-upload-section { display: block !important; animation: slideDown 0.3s ease-out; }
.wizard-new-step:has(input[name$="_music"][value="library"]:checked) .music-library-section { display: block !important; animation: slideDown 0.3s ease-out; }
.wizard-new-step:has(input[name$="_music"][value="none"]:checked) .wizard-new-footer[id*="MusicContinueFooter"] { display: block !important; animation: slideDown 0.3s ease-out; }

/* Dark theme music continue footer button color */
.wizard-modal-overlay[data-theme="dark"] #newMusicContinueFooter button,
.wizard-modal-overlay[data-theme="dark"] [id*="newMusicContinueFooter"] button {
    background: var(--pvc-primary) !important;
}

/* CSS-only show/hide for voice sections (works with template instances) */
.wizard-new-step:has(input[name$="_voice_mode"][value="library"]:checked) .voice-library-section { display: block !important; animation: slideDown 0.3s ease-out; }
.wizard-new-step:has(input[name$="_voice_mode"][value="library"]:checked) .custom-voice-section { display: none !important; }
.wizard-new-step:has(input[name$="_voice_mode"][value="custom"]:checked) .custom-voice-section { display: block !important; animation: slideDown 0.3s ease-out; }
.wizard-new-step:has(input[name$="_voice_mode"][value="custom"]:checked) .voice-library-section { display: none !important; }

/* Credits sections - hide by default, show based on radio selection */
.credits-share-section,
.credits-topup-section,
.credits-upgrade-section,
.credits-refer-section {
    display: none !important;
}

.dashboard-tab:has(input[name*="credits_mode"][value="share"]:checked) .credits-share-section { display: block !important; animation: slideDown 0.3s ease-out; }
.dashboard-tab:has(input[name*="credits_mode"][value="topup"]:checked) .credits-topup-section { display: block !important; animation: slideDown 0.3s ease-out; }
.dashboard-tab:has(input[name*="credits_mode"][value="upgrade"]:checked) .credits-upgrade-section { display: block !important; animation: slideDown 0.3s ease-out; }
.dashboard-tab:has(input[name*="credits_mode"][value="refer"]:checked) .credits-refer-section { display: block !important; animation: slideDown 0.3s ease-out; }

/* Additional selector for refer section - more specific */
.dashboard-tab input[name*="credits_mode"][value="refer"]:checked ~ * .credits-refer-section,
.dashboard-tab:has(input[name*="credits_mode"][value="refer"]:checked) .credits-refer-section { 
    display: block !important; 
    animation: slideDown 0.3s ease-out; 
}

/* Credit slider styling */
.credit-slider-input {
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #9ca3af !important; /* Gray background so user can see the slider bar */
    margin: 0;
    vertical-align: middle; /* Align slider track with thumb */
}

.credit-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    margin-top: -7px; /* Center thumb on track (thumb height 24px - track height 10px) / 2 = 7px */
}

.credit-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.credit-slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.credit-slider-input::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.credit-number-input {
    background: var(--bg-input, #1f2937) !important;
    color: var(--text-primary, #ffffff) !important;
    border-color: #6b7280 !important; /* Neutral gray, no blue hue */
}

.credit-number-input:focus {
    border-color: #9ca3af !important; /* Lighter gray on focus, no blue */
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2) !important; /* Gray shadow, no blue */
    outline: none !important;
}

/* Dark mode specific styles for credit slider and input */
/* Dark mode slider - make track visible */
.wizard-modal-overlay[data-theme="dark"] .credit-slider-input {
    background: #6b7280 !important; /* Darker gray for dark mode */
    background-image: none !important; /* Override any gradient */
}

.wizard-modal-overlay[data-theme="dark"] .credit-slider-input::-webkit-slider-track {
    background: #6b7280 !important;
    height: 10px;
    border-radius: 5px;
    margin-top: 0; /* Ensure track is centered */
}

.wizard-modal-overlay[data-theme="dark"] .credit-slider-input::-webkit-slider-runnable-track {
    background: #6b7280 !important;
    height: 10px;
    border-radius: 5px;
}

.wizard-modal-overlay[data-theme="dark"] .credit-slider-input::-moz-range-track {
    background: #6b7280 !important;
    height: 10px;
    border-radius: 5px;
}

.wizard-modal-overlay[data-theme="dark"] .credit-number-input {
    background: #1f2937 !important;
    color: #ffffff !important;
    border-color: #6b7280 !important; /* Neutral gray, no blue hue */
}

.wizard-modal-overlay[data-theme="dark"] .credit-number-input:focus {
    background: #1f2937 !important;
    color: #ffffff !important;
    border-color: #9ca3af !important; /* Lighter gray on focus, no blue */
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2) !important; /* Gray shadow, no blue */
    outline: none !important;
}

/* Credit sync - simple CSS-based sync */
.credit-sync {
    transition: all 0.2s ease;
}

/* Show brand upload when Custom is selected (works with template instances) */
.wizard-new-step:has(input[name$="_brand"][value="custom"]:checked) .brand-upload-section { display: block !important; animation: slideDown 0.3s ease-out; }

/* Show brand upload section when custom-branding watermark is selected */
.wizard-new-step:has(input[name*="_watermark"][value="custom-branding"]:checked) .brand-upload-section { display: block !important; animation: slideDown 0.3s ease-out; }

/* Chat Styles */
.chat-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.chat-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-send-btn:hover:not(:disabled) {
    background: #4f46e5 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-btn-emoji:hover,
.chat-btn-image:hover,
.chat-btn-link:hover {
    background: #f5f5f5 !important;
    transform: scale(1.05);
}

.members-list {
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.members-list::-webkit-scrollbar {
    width: 6px;
}

.members-list::-webkit-scrollbar-track {
    background: transparent;
}

.members-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

.emoji-item:hover {
    background: #f5f5f5 !important;
    transform: scale(1.2) !important;
}

.emoji-picker {
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.emoji-picker::-webkit-scrollbar {
    width: 6px;
}

.emoji-picker::-webkit-scrollbar-track {
    background: transparent;
}

.emoji-picker::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

/* Music Player Styles */
.music-player-modal .close-music-modal:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: rotate(90deg);
}

.music-player-modal .music-btn-play:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

.music-player-modal .music-btn-prev:hover,
.music-player-modal .music-btn-next:hover,
.music-player-modal .music-btn-shuffle:hover,
.music-player-modal .music-btn-stop:hover {
    background: #f0f0f0 !important;
    border-color: #667eea !important;
    transform: scale(1.05);
}

.music-player-modal .volume-slider,
.music-library-player-section .volume-slider {
    -webkit-appearance: none;
    appearance: none;
}

.music-player-modal .volume-slider::-webkit-slider-thumb,
.music-library-player-section .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.music-player-modal .volume-slider::-webkit-slider-thumb:hover,
.music-library-player-section .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.music-player-modal .volume-slider::-moz-range-thumb,
.music-library-player-section .volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.music-player-modal .volume-slider::-moz-range-thumb:hover,
.music-library-player-section .volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Music Library Player Button Hover Effects */
.music-library-player-section .music-btn-shuffle:hover,
.music-library-player-section .music-btn-prev:hover,
.music-library-player-section .music-btn-next:hover,
.music-library-player-section .music-btn-stop:hover {
    background: #f0f0f0 !important;
    border-color: #667eea !important;
    transform: scale(1.05);
}

.music-library-player-section .music-btn-play:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5) !important;
}


.music-player-modal .progress-track:hover {
    height: 6px;
}

.music-player-modal .progress-track:hover .progress-fill {
    height: 6px;
}

/* Show script editor/AI options based on template instances - CLASS-BASED (replaces :has() for reliability) */
/* Default: both hidden */
.wizard-new-script-editor {
    display: none;
}
.wizard-new-ai-options {
    display: none;
}

/* PASTE mode: show script editor, hide AI options */
.wizard-new-step.script-mode-paste .wizard-new-script-editor {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}
.wizard-new-step.script-mode-paste .wizard-new-ai-options {
    display: none !important;
}

/* AI mode: show AI options, hide script editor */
.wizard-new-step.script-mode-ai .wizard-new-ai-options {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}
.wizard-new-step.script-mode-ai .wizard-new-script-editor {
    display: none !important;
}

/* AI Options */
.wizard-new-ai-options {
    margin-top: 24px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.wizard-new-ai-section {
    margin-bottom: 24px;
}

.wizard-new-ai-section:last-child {
    margin-bottom: 0;
}

.wizard-new-ai-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.wizard-new-ai-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    box-sizing: border-box;
}

.wizard-new-ai-input:focus {
    outline: none;
    border-color: #6366f1;
}

.wizard-new-theme-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wizard-new-theme-bubble {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.wizard-new-theme-bubble:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.wizard-new-theme-checkbox {
    display: none;
}

.wizard-new-theme-bubble:has(.wizard-new-theme-checkbox:checked) {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.wizard-new-btn-hint {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Buttons */
.wizard-new-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.wizard-new-btn-primary {
    background: var(--pvc-primary) !important;
    color: white !important;
}

.wizard-new-btn-primary[disabled],
.wizard-new-btn-primary:disabled {
    background: var(--pvc-primary) !important;
    color: white !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Ensure buttons stay red during transitions - override any gray/white backgrounds */
.wizard-new-btn-primary,
.wizard-new-btn-primary[disabled],
.wizard-new-btn-primary:disabled,
[id*="wizardNewContinueWatermarked"],
[id*="wizardNewContinueNoWatermark"],
[id*="wizardNewContinueCustomBranding"] {
    background: var(--pvc-primary) !important;
    color: white !important;
}

[id*="wizardNewContinueWatermarked"] span,
[id*="wizardNewContinueNoWatermark"] span,
[id*="wizardNewContinueCustomBranding"] span,
[id*="wizardNewContinueWatermarked"] i,
[id*="wizardNewContinueNoWatermark"] i,
[id*="wizardNewContinueCustomBranding"] i {
    color: white !important;
}

.wizard-new-btn-primary:hover,
.wizard-new-btn-primary:focus,
.wizard-new-btn-primary:active {
    background: var(--pvc-primary) !important;
    color: #fff !important;
}

.wizard-new-btn-primary.saved {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

.wizard-new-btn-primary.saved:hover {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

.wizard-new-btn-primary:hover {
    background: var(--pvc-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--pvc-primary-shadow);
}

/* Shine animation for primary buttons (Step 5 Branding buttons, etc.) */
.wizard-new-btn-primary:not(.buy-credits-btn) {
    position: relative;
    overflow: hidden;
}

.wizard-new-btn-primary:not(.buy-credits-btn)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.wizard-new-btn-primary:not(.buy-credits-btn):hover::before {
    left: 100%;
}

/* Buy Credits Button - Red with shine animation (match Save Script button style) */
.buy-credits-btn.wizard-new-btn-primary {
    background: var(--pvc-primary) !important;
    color: white !important;
    position: relative;
    overflow: hidden;
}

.buy-credits-btn.wizard-new-btn-primary:hover {
    background: var(--pvc-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--pvc-primary-shadow);
}

/* Shine animation for Buy Credits button */
.buy-credits-btn.wizard-new-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.buy-credits-btn.wizard-new-btn-primary:hover::before {
    left: 100%;
}

.wizard-new-btn-generate {
    background: var(--pvc-primary);
    color: white;
    padding: 12px 24px;
    font-size: 1.0rem;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.wizard-new-btn-generate:disabled {
    background: var(--pvc-primary) !important;
    color: white !important;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Ensure generate button stays red during transitions */
.wizard-new-btn-generate,
.wizard-new-btn-generate[disabled],
.wizard-new-btn-generate:disabled,
[id*="wizardNewGenerate"] {
    background: var(--pvc-primary) !important;
}

.wizard-new-btn-generate:disabled:hover {
    background: var(--pvc-primary) !important;
    color: white !important;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.wizard-new-btn-generate:hover:not(:disabled) {
    background: var(--pvc-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--pvc-primary-shadow);
}

/* Shine animation for Generate Video button */
.wizard-new-btn-generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.wizard-new-btn-generate:hover:not(:disabled)::before {
    left: 100%;
}

/* Navigation Buttons */
.wizard-new-nav-btn {
    position: fixed;
    top: 50vh;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.wizard-new-nav-btn:hover {
    background: var(--pvc-primary);
    color: black;
    border-color: var(--pvc-primary);
    transform: translateY(-50%) scale(1.1);
}

.wizard-new-nav-prev:hover {
    background: var(--pvc-primary) !important;
    color: black !important;
    border-color: var(--pvc-primary) !important;
}

.wizard-new-nav-prev {
    /* left position will be set by JavaScript */
    background: var(--pvc-primary) !important;
    color: black !important;
    border-color: var(--pvc-primary) !important;
}

/* Make wrapper position relative so buttons are positioned relative to it */
.wizard-new-carousel-wrapper {
    position: relative;
}

.wizard-new-nav-next {
    /* right position will be set by JavaScript */
}

/* Footer */
.wizard-new-footer {
    margin-top: 16px;
    padding-top: 5px;
}

/* Show watermark info note only when watermarked is selected */
.wizard-new-step:has(input[name*="_watermark"][value="watermarked"]:checked) .wizard-new-watermark-info-note {
    display: flex !important;
    align-items: center !important;
    animation: slideDown 0.3s ease-out;
}

/* Hide watermark info note when no-watermark is selected */
.wizard-new-step:has(input[name*="_watermark"][value="no-watermark"]:checked) .wizard-new-watermark-info-note {
    display: none !important;
}

/* Show no-watermark info note only when no-watermark is selected */
.wizard-new-step:has(input[name*="_watermark"][value="no-watermark"]:checked) .wizard-new-no-watermark-info-note {
    display: flex !important;
    align-items: center !important;
    animation: slideDown 0.3s ease-out;
}

/* Hide no-watermark info note when watermarked or custom-branding is selected */
.wizard-new-step:has(input[name*="_watermark"][value="watermarked"]:checked) .wizard-new-no-watermark-info-note,
.wizard-new-step:has(input[name*="_watermark"][value="custom-branding"]:checked) .wizard-new-no-watermark-info-note {
    display: none !important;
}

/* Show watermark footer sections with animation */
.wizard-new-step:has(input[name*="_watermark"][value="watermarked"]:checked) .wizard-new-footer[id*="WatermarkedContinueFooter"] { 
    display: block !important; 
    animation: slideDown 0.3s ease-out; 
}

.wizard-new-step:has(input[name*="_watermark"][value="no-watermark"]:checked) .wizard-new-footer[id*="NoWatermarkContinueFooter"] { 
    display: block !important; 
    animation: slideDown 0.3s ease-out; 
}

.wizard-new-step:has(input[name*="_watermark"][value="custom-branding"]:checked) .music-continue-button-wrapper[id*="CustomBrandingContinueFooter"] { 
    display: block !important; 
    animation: slideDown 0.3s ease-out; 
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .wizard-new-option-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Step 1: On mobile, show 2 items per row for better use of space */
    /* Step 1 grid will automatically adjust with auto-fit */
    
    .wizard-new-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .wizard-new-nav-prev {
        left: 8px;
    }
    
    .wizard-new-nav-next {
        right: 8px;
    }
}

/* Help Menu Carousel Styles */
.help-carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.help-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: none;
    min-height: 500px;
}

.help-carousel-container {
    --help-offset: 0%;
}

.help-carousel-track {
    display: flex;
    flex-direction: row;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateX(var(--help-offset));
}

.help-step {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: block !important;
    box-sizing: border-box;
    opacity: 1;
    position: relative;
}

.help-step.active {
    display: block !important;
    opacity: 1 !important;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 0;
}

.help-item-wrapper {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.help-item-wrapper:has(.help-item-button:active),
.help-item-wrapper:has(.help-item-dropdown[style*="display: block"]) {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.help-item-button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 24px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-item-button:hover {
    background: #f5f5f5;
}

.help-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.help-item-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333;
}

.help-item-header h3 i.fas {
    color: inherit;
    margin-right: 8px;
}

.help-item-arrow {
    font-size: 1rem;
    color: #666;
    transition: transform 0.3s ease;
}

.help-item-wrapper:has(.help-item-dropdown[style*="display: block"]) .help-item-arrow {
    transform: rotate(180deg);
}

.help-item-button p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.help-item-dropdown {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 1px solid #e0e0e0;
    background: white;
    scrollbar-width: thin;
    scrollbar-color: #666666 #f5f5f5;
}

.help-item-dropdown::-webkit-scrollbar {
    width: 10px;
}

.help-item-dropdown::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

.help-item-dropdown::-webkit-scrollbar-thumb {
    background: #666666;
    border-radius: 5px;
    border: 2px solid #f5f5f5;
}

.help-item-dropdown::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

.help-item-content {
    padding: 24px;
    line-height: 1.8;
    color: #333;
}

.help-item-content h3 {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333;
}

.help-item-content h4 {
    margin: 24px 0 12px 0;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333;
}

.help-item-content h5 {
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.help-item-content p {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: #666;
}

.help-item-content ul,
.help-item-content ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

.help-item-content li {
    margin: 8px 0;
    font-size: 1.1rem;
    color: #555;
}

/* Dark mode styles for help-item-content lists */
.wizard-modal-overlay[data-theme="dark"] .help-item-content ul,
.wizard-modal-overlay[data-theme="dark"] .help-item-content ol {
    color: #9ca3af;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-content li {
    color: #9ca3af;
    font-size: 1.1rem;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-content p {
    color: #c0c0c0;
}

.help-item-content strong {
    color: #333;
    font-weight: 600;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-content strong {
    color: #f3f4f6;
}

.help-link {
    color: #6366f1;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.help-card:hover .help-link {
    gap: 8px;
}

.help-document {
    padding: 32px;
    background: white;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.help-document h2 {
    margin: 0 0 24px 0;
    font-size: 2rem;
    font-weight: 700;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 16px;
}

.help-document-content {
    line-height: 1.8;
    color: #333;
}

.help-document-content h3 {
    margin: 32px 0 16px 0;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333;
}

.help-document-content h4 {
    margin: 24px 0 12px 0;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333;
}

.help-document-content h5 {
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.help-document-content p {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: #666;
}

.help-document-content ul,
.help-document-content ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

.help-document-content li {
    margin: 8px 0;
    font-size: 1rem;
    color: #666;
}

.help-document-content strong {
    color: #333;
    font-weight: 600;
}

.help-back-btn {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    z-index: 10;
}

/* Help carousel offset transitions */
.help-carousel-container:has(.help-step[data-help-step="getting-started"].active) {
    --help-offset: -100%;
}

.help-carousel-container:has(.help-step[data-help-step="video-creation"].active) {
    --help-offset: -200%;
}

.help-carousel-container:has(.help-step[data-help-step="billing-credits"].active) {
    --help-offset: -300%;
}

.help-carousel-container:has(.help-step[data-help-step="faq"].active) {
    --help-offset: -400%;
}

.help-carousel-container:has(.help-step[data-help-step="contact"].active) {
    --help-offset: -500%;
}

@media (max-width: 768px) {
    .help-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .help-document {
        padding: 20px;
    }
    
    .help-back-btn {
        left: 8px;
    }
}

/* Toast Notification System */
.pvc-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.pvc-toast {
    min-width: 320px;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #6366f1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.pvc-toast.success {
    border-left-color: #10b981;
}

.pvc-toast.error {
    border-left-color: #ef4444;
}

.pvc-toast.warning {
    border-left-color: #f59e0b;
}

.pvc-toast.info {
    border-left-color: #3b82f6;
}

.pvc-toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pvc-toast.success .pvc-toast-icon {
    color: #10b981;
}

.pvc-toast.error .pvc-toast-icon {
    color: #ef4444;
}

.pvc-toast.warning .pvc-toast-icon {
    color: #f59e0b;
}

.pvc-toast.info .pvc-toast-icon {
    color: #3b82f6;
}

.pvc-toast-content {
    flex: 1;
}

.pvc-toast-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.pvc-toast-message {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.pvc-toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pvc-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.pvc-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #6366f1;
    /* animation duration set inline in JS to match toast timeout */
}

.pvc-toast.success .pvc-toast-progress {
    background: #10b981;
}

.pvc-toast.error .pvc-toast-progress {
    background: #ef4444;
}

.pvc-toast.warning .pvc-toast-progress {
    background: #f59e0b;
}

.pvc-toast.info .pvc-toast-progress {
    background: #3b82f6;
}

.pvc-toast-message a,
.pvc-toast-message a:visited {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.pvc-toast.closing {
    animation: slideOutRight 0.3s ease-in forwards;
}

@media (max-width: 768px) {
    .pvc-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .pvc-toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* Welcome Screen Styles - Modern & Flashy */
.pvc-welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.pvc-welcome-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

.pvc-welcome-screen.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.pvc-welcome-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.welcome-stage {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-stage.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    animation: stageEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-stage.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.9);
}

@keyframes stageEnter {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translateY(0);
    }
}

/* Text Rotator Styles - Enhanced & Flashy */
.lqd-text-rotator-el {
    margin: 0;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: "Manrope", sans-serif;
    font-size: 0.9em;
    line-height: 1.3em;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.01em;
    animation: textGlow 3s ease-in-out infinite;
}

.lqd-text-rotator-el .welcome-text {
    color: #ffffff;
}

.welcome-title-rotator {
    white-space: nowrap;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 255, 255, 0.2),
            0 2px 4px rgba(0, 0, 0, 0.15);
    }
    50% {
        text-shadow: 
            0 0 25px rgba(255, 255, 255, 0.5),
            0 0 50px rgba(255, 255, 255, 0.3),
            0 0 70px rgba(255, 255, 255, 0.2),
            0 2px 4px rgba(0, 0, 0, 0.15);
    }
}

.lqd-text-rotator-items {
    display: inline-grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
    color: #ffffff !important;
    width: var(--lqd-tr-width, auto);
    transition: width 0.3s ease;
}

.lqd-text-rotator-item {
    grid-area: 1 / 1;
    opacity: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #ffffff !important;
}

.lqd-text-rotator-item.lqd-is-active {
    --lqd-transition-duration: 0.4s;
    --lqd-tr-enter-duration: 0.4s;
    --lqd-tr-enter-x: 0;
    --lqd-tr-enter-y: 30px;
    --lqd-tr-enter-z: 0;
    --lqd-tr-enter-opacity: 0;
    --lqd-tr-enter-blur: 15px;
    --lqd-tr-enter-scale: 0.8;
    --lqd-transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: lqd-text-rotator-enter var(--lqd-tr-enter-duration) var(--lqd-transition-timing-function) forwards;
    z-index: 2;
}

.lqd-text-rotator-item.lqd-was-active {
    --lqd-transition-duration: 0.3s;
    --lqd-tr-leave-duration: 0.3s;
    --lqd-tr-leave-x: 0;
    --lqd-tr-leave-y: -30px;
    --lqd-tr-leave-z: 0;
    --lqd-tr-leave-opacity: 0;
    --lqd-tr-leave-blur: 15px;
    --lqd-tr-leave-scale: 0.8;
    --lqd-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation: lqd-text-rotator-leave var(--lqd-tr-leave-duration) var(--lqd-transition-timing-function) forwards;
}

@keyframes lqd-text-rotator-enter {
    0% {
        transform: translate3d(var(--lqd-tr-enter-x, 0), var(--lqd-tr-enter-y, 30px), var(--lqd-tr-enter-z, 0)) scale(var(--lqd-tr-enter-scale, 0.8)) rotateX(0) rotateY(0) rotateZ(0) skew(0, 0);
        opacity: var(--lqd-tr-enter-opacity, 0);
        filter: blur(var(--lqd-tr-enter-blur, 15px));
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1) rotateX(0) rotateY(0) rotateZ(0) skew(0, 0);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes lqd-text-rotator-leave {
    0% {
        transform: translate3d(0, 0, 0) scale(1) rotateX(0) rotateY(0) rotateZ(0) skew(0, 0);
        opacity: 1;
        filter: blur(0);
    }
    100% {
        transform: translate3d(var(--lqd-tr-leave-x, 0), var(--lqd-tr-leave-y, -30px), var(--lqd-tr-leave-z, 0)) scale(var(--lqd-tr-leave-scale, 0.8)) rotateX(0) rotateY(0) rotateZ(0) skew(0, 0);
        opacity: var(--lqd-tr-leave-opacity, 0);
        filter: blur(var(--lqd-tr-leave-blur, 15px));
    }
}

.welcome-title-static {
    font-family: "Manrope", sans-serif;
    font-size: 0.9em;
    line-height: 1.3em;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    padding: 0;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.01em;
    animation: textGlow 3s ease-in-out infinite;
}

.welcome-stage-4 .welcome-title-static {
    font-size: 1.8em; /* 1x bigger (doubled from 0.9em) */
}

/* Login Form Styles - Glassmorphism */
.welcome-login-form {
    max-width: 90%;
    width: 90%;
    padding: 80px 70px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: formSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-login-form {
        padding: 40px 30px;
        max-width: 95%;
        width: 95%;
    }
    
    .login-tabs {
        margin-bottom: 30px;
    }
    
    .login-tab {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .form-group {
        margin-bottom: 22px;
    }
    
    .form-group input {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .pvc-auth-btn {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .password-requirements {
        gap: 6px;
    }
    
    .requirement {
        font-size: 12px;
        gap: 8px;
        white-space: normal;
        line-height: 1.3;
        align-items: center;
    }
    
    .requirement-icon {
        font-size: 14px;
        width: 18px;
        min-width: 18px;
        max-width: 18px;
        height: 18px;
        flex-shrink: 0;
        flex: 0 0 18px;
    }
    
    .requirement-text {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .welcome-login-form {
        padding: 30px 20px;
        max-width: 98%;
        width: 98%;
    }
    
    .login-tab {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .form-group input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .pvc-auth-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .requirement {
        font-size: 11px;
        gap: 6px;
    }
    
    .requirement-icon {
        font-size: 12px;
        width: 16px;
        min-width: 16px;
        max-width: 16px;
        height: 16px;
    }
    
    .requirement-text {
        font-size: 11px;
    }
}

@keyframes formSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 45px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.login-tab {
    flex: 1;
    padding: 18px 28px;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.login-tab.active {
    color: #ffffff;
}

.login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #5b3af1;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(91, 58, 241, 0.18);
}

.login-form-content {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-form-content.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.login-form-content.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pvc-auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 28px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group input {
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    outline: none;
    border-color: #5b3af1;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 0 0 4px rgba(91, 58, 241, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.pvc-auth-btn {
    width: 100%;
    padding: 18px 28px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-bottom: 18px;
}

.pvc-auth-btn-primary {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    color: white !important;
    border: none;
    border-color: var(--pvc-primary) !important;
    box-shadow: 
        0 4px 15px var(--pvc-primary-shadow),
        0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.pvc-auth-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.pvc-auth-btn-primary:hover::before {
    left: 100%;
}

.pvc-auth-btn-primary:hover {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px var(--pvc-primary-shadow),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.pvc-auth-btn-primary:active {
    transform: translateY(0);
}

.pvc-auth-btn-google {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.pvc-auth-btn-google:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.google-icon {
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    background: rgba(255, 255, 255, 0.2);
}

.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    text-align: left;
}

.auth-success {
    background: rgba(40, 167, 69, 0.15) !important;
    border-color: rgba(40, 167, 69, 0.3) !important;
    color: #ffffff !important;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    z-index: 10;
    color: rgba(255, 255, 255, 0.7);
}

.toggle-password:hover {
    opacity: 1;
    color: #5b3af1;
}

.toggle-password .eye-icon {
    font-size: 18px;
    filter: grayscale(1) brightness(2);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    padding: 0;
}

.forgot-password-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #5b3af1;
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 12px;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: #ef4444;
}

.strength-fill.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-fill.strong {
    width: 100%;
    background: #5b3af1;
}

.strength-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
}

/* Password Requirements */
.password-requirements {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    overflow: hidden;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    width: 100%;
    min-height: 22px;
    flex-wrap: nowrap;
}

.requirement-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
    flex: 0 0 20px;
}

.requirement-text {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.requirement-icon {
    /* Icon content is set via JavaScript .text() method */
    /* No CSS content to avoid duplicates */
}

.requirement.valid {
    color: #5b3af1;
}

/* Input Icons */
.form-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 18px;
    opacity: 0.6;
}

.form-group input {
    padding-right: 50px;
}

/* Field Error */
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #ff6b6b;
    text-align: left;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.terms-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}

.terms-checkbox a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}

.terms-checkbox a:hover {
    color: #5b3af1;
}

/* Forgot Password Form */
.forgot-password-header {
    text-align: center;
    margin-bottom: 28px;
}

.forgot-password-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.forgot-password-header p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-to-login-link:hover {
    color: #5b3af1;
    text-decoration: underline;
}

/* Button Loader */
.btn-loader {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

.pvc-auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }
    
    .welcome-content {
        padding: 20px;
    }
}

/* History Tab Styles */
.template-filter-bubbles .template-bubble:hover {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

.template-filter-bubbles .template-bubble input:checked + span {
    color: #6366f1;
    font-weight: 600;
}

.template-filter-bubbles .template-bubble input:checked ~ span,
.template-filter-bubbles .template-bubble:has(input:checked) {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.1) !important;
}

.products-grid .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.products-grid .product-card video {
    cursor: pointer;
}

.search-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Fade-in animation for Video Storage and Your Videos sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video Storage section fade-in - target by icon class */
.settings-card:has(h3 i.fa-cloud) {
    animation: fadeInUp 0.6s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Your Videos section fade-in - target by icon class */
.settings-card:has(h3 i.fa-video) {
    animation: fadeInUp 0.6s ease-out 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Fallback for browsers that don't support :has() - use JavaScript to add class */
.settings-card.fade-in-storage {
    animation: fadeInUp 0.6s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.settings-card.fade-in-videos {
    animation: fadeInUp 0.6s ease-out 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* CRITICAL: Generate Script Button - Force red color with maximum specificity */
/* This must be at the end to override any other styles */
button.wizard-new-btn.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"],
button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary,
.wizard-modal-overlay button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary,
.wizard-modal-overlay .wizard-new-btn.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"],
.wizard-modal-content button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    border-color: var(--pvc-primary) !important;
    color: white !important;
}

button.wizard-new-btn.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:hover,
button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary:hover,
.wizard-modal-overlay button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary:hover,
.wizard-modal-overlay .wizard-new-btn.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:hover,
.wizard-modal-content button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary:hover {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    border-color: var(--pvc-primary) !important;
    color: white !important;
}

button.wizard-new-btn.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"]:disabled,
button.wizard-new-btn.wizard-new-btn-primary[id*="newGenerateAiScriptBtn"][disabled],
button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary:disabled,
button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary[disabled],
.wizard-modal-overlay button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary:disabled,
.wizard-modal-overlay button[id*="newGenerateAiScriptBtn"].wizard-new-btn.wizard-new-btn-primary[disabled] {
    background: var(--pvc-primary) !important;
    background-color: var(--pvc-primary) !important;
    border-color: var(--pvc-primary) !important;
    color: white !important;
    opacity: 0.6 !important;
}

/* Email and Password Forms - Ensure visibility above wizard modal */
[id*="emailForm"]:not([style*="display: none"]),
[id*="passwordForm"]:not([style*="display: none"]) {
    position: relative !important;
    z-index: 10002 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure form inputs are visible when form is shown */
[id*="emailForm"]:not([style*="display: none"]) input,
[id*="passwordForm"]:not([style*="display: none"]) input {
    position: relative !important;
    z-index: 10003 !important;
    visibility: visible !important;
}

/* Ensure form buttons are visible when form is shown */
[id*="emailForm"]:not([style*="display: none"]) button,
[id*="passwordForm"]:not([style*="display: none"]) button {
    position: relative !important;
    z-index: 10003 !important;
    visibility: visible !important;
}

/* Resources tab: Bible search — single rounded shell; field + Search share one height */
.pvc-bible-search-hero .pvc-bible-search-composite:focus-within {
    border-color: rgba(60, 140, 255, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(60, 140, 255, 0.2) !important;
}

.pvc-bible-search-hero .pvc-bible-search-composite .pvc-bible-search-input:focus {
    box-shadow: none !important;
}

/* Modal-wide input[type=text] uses 12px radius — zero here so right edge is square and flush with Search button; shell clips left curve */
.pvc-bible-search-hero .pvc-bible-search-composite .pvc-bible-search-input,
.wizard-modal-content .pvc-bible-search-composite .pvc-bible-search-input,
.pvc-wizard-wrapper .pvc-bible-search-composite .pvc-bible-search-input {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}

/* Bible search submit: blue accent (not wizard primary red); flush in composite bar */
.pvc-bible-search-hero .pvc-bible-search-submit-btn {
    white-space: nowrap;
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    align-self: stretch;
    min-height: 0;
    background: rgba(59, 130, 246, 0.42) !important;
    background-color: rgba(59, 130, 246, 0.42) !important;
    color: #f8fafc !important;
    cursor: pointer;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.pvc-bible-search-hero .pvc-bible-search-submit-btn .btn-text,
.pvc-bible-search-hero .pvc-bible-search-submit-btn .btn-icon,
.pvc-bible-search-hero .pvc-bible-search-submit-btn i {
    color: inherit !important;
}

.pvc-bible-search-hero .pvc-bible-search-submit-btn:hover {
    background: rgba(59, 130, 246, 0.58) !important;
    background-color: rgba(59, 130, 246, 0.58) !important;
    color: #ffffff !important;
}

.pvc-bible-search-hero .pvc-bible-search-submit-btn:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.7);
    outline-offset: -2px;
}

/* Flush to the field: no primary-button lift/shine */
.pvc-bible-search-hero .pvc-bible-search-submit-btn:hover,
.pvc-bible-search-hero .pvc-bible-search-submit-btn:focus,
.pvc-bible-search-hero .pvc-bible-search-submit-btn:active {
    transform: none !important;
    box-shadow: none !important;
}

/* Results and reader panels: give more height when viewport is tall */
.pvc-bible-panels-wrap .bible-search-results-panel,
.pvc-bible-panels-wrap .bible-reader-panel {
    min-height: 320px;
}
@media (min-height: 800px) {
    .pvc-bible-panels-wrap .bible-search-results-panel,
    .pvc-bible-panels-wrap .bible-reader-panel {
        max-height: 65vh;
    }
}

/* -----------------------------------------------------------------------------
 * Dashboard panel enter — slide-up motion for sidebar tabs (not Create Content).
 * Targets inner scroll/content wrappers only; avoids stacking on all-videos grid/cards.
 * --------------------------------------------------------------------------- */
@keyframes pvcPanelFadeInUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-tab[data-tab="get-credits"].active.fade-in .tab-content-wrapper,
.dashboard-tab[data-tab="all-scripts"].active.fade-in .settings-content,
.dashboard-tab[data-tab="bible-resources"].active.fade-in .settings-content,
.dashboard-tab[data-tab="settings"].active.fade-in .settings-content,
.dashboard-tab[data-tab="help"].active.fade-in .help-content {
    animation: pvcPanelFadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Optional: align My Videos tab header motion without animating the storage/grid stack */
.dashboard-tab[data-tab="all-videos"].active.fade-in > .tab-header {
    animation: pvcPanelFadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-tab[data-tab="get-credits"].active.fade-in .tab-content-wrapper,
    .dashboard-tab[data-tab="all-scripts"].active.fade-in .settings-content,
    .dashboard-tab[data-tab="bible-resources"].active.fade-in .settings-content,
    .dashboard-tab[data-tab="settings"].active.fade-in .settings-content,
    .dashboard-tab[data-tab="help"].active.fade-in .help-content,
    .dashboard-tab[data-tab="all-videos"].active.fade-in > .tab-header {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}


