/* VVC New UI Styles - creator-ui.css */

/* --- Overall App Theme & Variables --- */
:root {
    --vvc-bg-primary: #1A1A1D;         /* Very dark grey / near black */
    --vvc-bg-secondary: #232328;     /* Slightly lighter for cards/elements */
    --vvc-bg-tertiary: #2C2C2E;      /* For inputs, darker elements */
    --vvc-text-primary: #E5E5E5;       /* Main light text - slightly brighter */
    --vvc-text-secondary: #B8B8B8;     /* Dimmer text for descriptions - slightly brighter */
    --vvc-text-headings: #FFFFFF;      /* Pure white for main headings */
    --vvc-text-label: #D0D0D0;         /* Labels - slightly brighter */
    --vvc-accent-primary: #00A8FF;     /* Bright Blue */
    --vvc-accent-secondary: #0088CC;   /* Darker Blue for hover */
    --vvc-border-color: #38383F;       /* Dark border for elements */
    --vvc-error-bg: #442222;
    --vvc-error-text: #FFCDCD;
    --vvc-error-border: #883333;
    --vvc-success-bg: #223E52;
    --vvc-success-text: #B8E6FF;
    --vvc-success-border: #336A8A;
    --vvc-font-primary: 'Open Sans', sans-serif;
    --vvc-font-headings: 'Montserrat', sans-serif;
}

#vvc-creator-app {
    background-color: var(--vvc-bg-primary);
    color: var(--vvc-text-primary); 
    font-family: var(--vvc-font-primary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 750px; 
    margin: 30px auto;
    border: 1px solid var(--vvc-border-color);
    overflow: hidden; 
}

#vvc-creator-app h2 {
    color: var(--vvc-text-headings);
    font-family: var(--vvc-font-headings);
    font-weight: 600;
    border-bottom: 2px solid var(--vvc-accent-primary); 
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.7em;
    text-align: center;
}

#vvc-creator-app p, 
#vvc-creator-app p.description { 
    font-size: 0.95em; 
    color: var(--vvc-text-secondary); 
    line-height: 1.6;
}
#vvc-creator-app p.description {
     margin-top: 8px; margin-bottom: 18px;
}


/* --- Header Controls (Start Over Button) --- */
.vvc-header-controls { margin-bottom: 20px; min-height: 40px; }

/* --- Status Messages --- */
#vvc-creator-app .vvc-status-message {
    padding: 12px 18px; margin-bottom: 20px; border-radius: 6px;
    border: 1px solid transparent; font-weight: 500; text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#vvc-creator-app .vvc-status-message.error { background-color: var(--vvc-error-bg); color: var(--vvc-error-text); border-color: var(--vvc-error-border); }
#vvc-creator-app .vvc-status-message:not(.error) { background-color: var(--vvc-success-bg); color: var(--vvc-success-text); border-color: var(--vvc-success-border); }

/* --- Card Styling --- */
#vvc-creator-app .vvc-card {
    background-color: var(--vvc-bg-secondary);
    padding: 30px; border-radius: 8px; border: 1px solid var(--vvc-border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}


/* --- Form Elements --- */
#vvc-creator-app .vvc-form-group { margin-bottom: 22px; }
#vvc-creator-app label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--vvc-text-label); font-size: 0.95em; }
#vvc-creator-app select,
#vvc-creator-app textarea,
#vvc-creator-app input[type="text"] {
    background-color: var(--vvc-bg-tertiary); color: var(--vvc-text-primary);
    border: 1px solid #4A4A52; padding: 10px 12px; border-radius: 5px; width: 100%;
    box-sizing: border-box; font-size: 1em; transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#vvc-creator-app select:focus,
#vvc-creator-app textarea:focus,
#vvc-creator-app input[type="text"]:focus {
    border-color: var(--vvc-accent-primary); box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.25); outline: none;
}
#vvc-creator-app textarea { min-height: 90px; resize: vertical; }
#vvc-creator-app input[type="radio"] { margin-right: 8px; vertical-align: middle; accent-color: var(--vvc-accent-primary); }
#vvc-creator-app input[type="radio"] + label { display: inline; font-weight: normal; color: var(--vvc-text-primary); font-size: 0.9em; }

/* --- Buttons --- */
#vvc-creator-app .vvc-button {
    background: linear-gradient(145deg, var(--vvc-accent-primary), var(--vvc-accent-secondary));
    color: #FFFFFF; border: none; padding: 12px 22px; border-radius: 6px; cursor: pointer;
    font-size: 0.95em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px;
    transition: all 0.2s ease-in-out; box-shadow: 0 3px 8px rgba(0,0,0,0.3); margin: 5px; 
}
#vvc-creator-app .vvc-button:hover { background: linear-gradient(145deg, var(--vvc-accent-secondary), var(--vvc-accent-primary)); transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0, 168, 255, 0.3); }
#vvc-creator-app .vvc-button:active { transform: translateY(0px); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
#vvc-creator-app .vvc-button:disabled,
#vvc-creator-app .vvc-button.vvc-loading { background: #444; color: #888; cursor: not-allowed; opacity: 0.6; transform: translateY(0px); box-shadow: none;}
#vvc-creator-app .vvc-button-secondary { background: linear-gradient(145deg, #5a5a5e, #3a3a3e); }
#vvc-creator-app .vvc-button-secondary:hover { background: linear-gradient(145deg, #6a6a6e, #4a4a4e); }
#vvc-creator-app .vvc-button-group { margin-top: 30px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#vvc-creator-app .vvc-button-group-step2 { display: flex; justify-content: space-between; align-items: center; }
#vvc-creator-app .vvc-button-group-step2 .vvc-prev-step { margin-right: auto; }

/* --- Style Selection Cards (Horizontal Slider) --- */
.vvc-style-slider-wrapper {
    overflow-x: auto; 
    overflow-y: hidden;
    white-space: nowrap; 
    padding: 10px 0 20px 0; 
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: thin; 
    scrollbar-color: var(--vvc-accent-primary) var(--vvc-bg-tertiary); 
}
.vvc-style-slider-wrapper::-webkit-scrollbar { height: 8px; }
.vvc-style-slider-wrapper::-webkit-scrollbar-track { background: var(--vvc-bg-tertiary); border-radius: 4px; }
.vvc-style-slider-wrapper::-webkit-scrollbar-thumb { background-color: var(--vvc-accent-primary); border-radius: 4px; border: 2px solid var(--vvc-bg-tertiary); }
.vvc-style-slider-wrapper::-webkit-scrollbar-thumb:hover { background-color: var(--vvc-accent-secondary); }

#vvc-style-cards-container.vvc-style-cards-slider {
    display: inline-flex; 
    gap: 18px; 
    padding-left: 10px; 
    padding-right: 10px; 
}
.vvc-style-card {
    background-color: var(--vvc-bg-tertiary);
    border: 2px solid var(--vvc-border-color);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: inline-flex; 
    flex-direction: column; 
    width: 160px;
    flex-shrink: 0; 
    overflow: hidden;
    position: relative; 
}
.vvc-style-card:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--vvc-accent-secondary); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.vvc-style-card.selected {
    border-color: var(--vvc-accent-primary);
    box-shadow: 0 0 0 3px var(--vvc-accent-primary), 0 5px 15px rgba(0, 168, 255, 0.4); 
    transform: translateY(-2px) scale(1.03);
}

.vvc-style-card .vvc-style-card-image-wrapper {
    width: 100%; 
    height: 200px;
    overflow: hidden;
    background-color: #111; 
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px;
    display: flex; 
    align-items: center;
    justify-content: center;
}
.vvc-style-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px;
    transition: transform 0.3s ease;
}
.vvc-style-card:hover img { transform: scale(1.05); }

.vvc-style-card-name {
    font-size: 0.9em; 
    font-weight: 600;
    color: #FFFFFF;
    padding: 10px 8px; 
    margin: 0; 
    width: 100%;
    box-sizing: border-box;
    line-height: 1.3; 
    white-space: normal; 
    min-height: 50px;
    display: flex;
    align-items: center; 
    justify-content: center;
}
.vvc-style-card.selected .vvc-style-card-name {
    color: var(--vvc-accent-primary); 
    font-weight: 700; 
}
#vvc-video-style-description {
    text-align: center; font-style: italic; min-height: 2.5em; 
    margin-top: 20px; padding: 0 10px; color: var(--vvc-text-secondary); font-size: 0.9em;
}


/* --- Result Areas & Pexels --- */
#vvc-creator-app .vvc-result-area { background-color: var(--vvc-bg-primary); border: 1px solid var(--vvc-border-color); padding: 15px; border-radius: 6px; min-height: 60px; font-size: 0.95em; line-height: 1.6; overflow-y: auto; max-height: 250px; color: var(--vvc-text-primary); }
#vvc-creator-app .vvc-result-area p { color: var(--vvc-text-primary); } 
#vvc-creator-app .vvc-result-area p i { color: #888; }
#vvc-creator-app .vvc-result-area audio { width: 100%; margin-top: 10px; filter: invert(0.9) hue-rotate(180deg) contrast(0.9); }

/* --- Final Summary & Progress --- */
#vvc-final-summary { background-color: var(--vvc-bg-tertiary) !important; border: 1px solid var(--vvc-border-color) !important; color: var(--vvc-text-primary); padding: 20px !important; border-radius: 6px; }
#vvc-final-progress progress { border: 1px solid #555; height: 22px; border-radius:11px;}
#vvc-final-progress progress::-webkit-progress-bar { background-color: #3a3a3e; border-radius:10px;}
#vvc-final-progress progress::-webkit-progress-value { background-color: var(--vvc-accent-primary); border-radius:10px;}
#vvc-progress-status { text-align: center; margin-top: 10px; font-weight: 500; color: var(--vvc-text-primary); } 
#vvc-progress-status.error { color: var(--vvc-error-text); }
#vvc-final-video-output video { border: 1px solid var(--vvc-border-color); border-radius: 6px; margin-top:10px; }

/* Loader Spinner for buttons */
.vvc-loader-spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: vvc-spin 1s ease-in-out infinite; -webkit-animation: vvc-spin 1s ease-in-out infinite; margin-right: 8px; vertical-align: middle; }
@keyframes vvc-spin { to { transform: rotate(360deg); } }
@-webkit-keyframes vvc-spin { to { -webkit-transform: rotate(360deg); } }

/* --- FINAL BUTTON CLICKABILITY FIX --- */
#vvc-final-progress {
    position: relative;
    z-index: 1;
}
#vvc-final-video-output {
    position: relative;
    z-index: 10; /* Ensure this container is on top */
    pointer-events: auto !important; /* Ensure the container itself can receive events */
}
#vvc-final-video-output .vvc-button {
    pointer-events: auto !important; /* Explicitly make buttons clickable */
    cursor: pointer;
}