/* Prompt Based Generation — Full 4-Step Styles
   Extends generate-html.css which is also loaded on this page */

/* ── Ad Creative Layout Revision ──────────────────────────── */
.welcome-container.flow-active {
    padding-top: 100px;
    padding-bottom: 60px;
}

.stepper-layout-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

/* Short filler video scaffold */
.short-filler-video-page .form-select,
.short-filler-video-page .form-control {
    min-height: 3.35rem;
    line-height: 1.5 !important;
    box-sizing: border-box;
}

.short-filler-video-page .form-select {
    padding: 0.85rem 2.85rem 0.85rem 1.1rem !important;
    background-position: right 1rem center;
    background-size: 16px 12px;
}

.short-filler-video-page .form-control {
    padding: 1rem 1.1rem !important;
}

.short-filler-video-page textarea.form-control {
    min-height: auto;
    padding: 1rem 1.1rem !important;
    overflow-y: auto;
    resize: vertical;
}

.short-filler-video-page .form-control::placeholder,
.short-filler-video-page .form-select,
.short-filler-video-page .form-control {
    color: #ffffff !important;
}

/* Sidebar Stepper */
.stepper-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.vertical-stepper {
    display: flex;
    flex-direction: column;
    padding-left: 10px;
}

.stepper-item {
    position: relative;
    padding-bottom: 3.5rem;
}

.stepper-item:last-child {
    padding-bottom: 0;
}

/* Connector Line */
.step-connector {
    position: absolute;
    top: 36px;
    left: 18px;
    width: 1px;
    height: calc(100% - 24px);
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.stepper-item.completed .step-connector {
    background: var(--bs-primary);
}

.step-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    z-index: 2;
}

/* Nodes */
.step-node-wrapper {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.step-node {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: #0d1117;
}

.stepper-item.active .step-node {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    box-shadow: 0 0 15px rgba(193, 255, 114, 0.15);
}

.stepper-item.completed .step-node {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #1a2025;
    font-weight: 800;
}

/* Text */
.step-main-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
}

.stepper-item.active .step-main-label {
    color: white;
}

.step-sub-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.3;
}

/* Badges */
.step-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 10px;
    white-space: nowrap;
}

.badge-required {
    background: rgba(0, 255, 209, 0.1);
    color: #C1FF72;
    border: 1px solid rgba(0, 255, 209, 0.2);
}

.badge-optional {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-recommended {
    background: rgba(162, 89, 255, 0.1);
    color: #a259ff;
    border: 1px solid rgba(162, 89, 255, 0.2);
}

/* Main Area Card */
.stepper-main-area {
    flex-grow: 1;
}

.step-content-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.25rem 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    overflow: visible;
    position: relative;
}

.step-content-container {
    flex: 0 0 auto;
    overflow: visible;
    padding-right: 0;
    max-height: none;
    padding-bottom: 0;
}

/* Step Pane Headers */
.step-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.step-header-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
}

/* Brief Section */
.creative-brief-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Subject Tabs */
.subject-type-tabs {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.subject-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    width: auto;
    text-align: left;
    min-width: 120px;
}

.subject-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.subject-tab.active {
    background: rgba(193, 255, 114, 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.step-2-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.step-2-left {
    position: sticky;
    top: 0;
}

.step-2-right {
    min-width: 0;
}

.subject-type-tabs-vertical {
    flex-direction: column;
    flex-wrap: nowrap;
}

.subject-type-tabs-vertical .subject-tab {
    width: 100%;
    min-width: 0;
}

.step-2-body {
    min-height: 260px;
}

.step-2-empty-tip {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brief-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.brief-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    color: white !important;
    padding: 1.25rem;
    font-size: 0.95rem;
    outline: none !important;
    transition: border-color 0.2s ease;
}

.brief-textarea:focus {
    border-color: var(--bs-primary) !important;
}

/* Navigation Buttons */
#step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    position: static;
    bottom: auto;
    background: transparent;
    z-index: 2;
}

#step-nav.result-active {
    position: static;
    background: transparent;
    padding-top: 0;
    border-top-color: transparent !important;
}

#step-nav.result-active #btn-prev {
    display: none;
}

#btn-next {
    --bs-btn-bg: #C1FF72;
    --bs-btn-border-color: #C1FF72;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #C1FF72;
    --bs-btn-hover-border-color: #C1FF72;
    --bs-btn-focus-shadow-rgb: 193, 255, 114;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #C1FF72;
    --bs-btn-active-border-color: #C1FF72;
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #C1FF72;
    --bs-btn-disabled-border-color: #C1FF72;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    border-radius: 12px;
}

#btn-next:focus,
#btn-next:focus-visible,
#btn-next:hover,
#btn-next:active {
    background-color: #C1FF72;
    border-color: #C1FF72;
    color: #000;
}

#btn-prev {
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
    border: none;
    padding: 0;
    text-decoration: none;
}

#btn-prev:hover {
    color: white;
}

/* Directives Accordion */
.directives-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.directive-accordion {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.directive-accordion.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.directive-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.acc-chevron {
    transition: transform 0.3s ease;
    opacity: 0.4;
}

.directive-accordion.active .acc-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.selected-badge {
    background: var(--bs-primary);
    color: #1a2025;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}

.directive-body {
    max-height: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.directive-accordion.active .directive-body {
    max-height: 500px;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.directive-scroll-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.directive-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    color: white;
}

.directive-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.directive-btn.active {
    background: rgba(0, 255, 209, 0.05);
    border-color: #C1FF72;
    box-shadow: 0 0 15px rgba(0, 255, 209, 0.1);
}

.directive-btn strong {
    font-size: 0.9rem;
    font-weight: 700;
}

.directive-btn span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.custom-card {
    grid-column: span 2;
    cursor: default;
}

.directive-custom-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    color: white !important;
    padding: 0.75rem;
    font-size: 0.85rem;
    margin-top: 8px;
    resize: none;
    min-height: 80px;
}

.clear-directive-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.clear-directive-btn:hover {
    color: #ff6060;
}

/* Slot Enhancements */
.upload-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.upload-slot {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-pane-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1200px) {
    .step-pane-grid {
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 2.5rem;
        align-items: stretch !important;
    }

    .description-column {
        display: flex;
        flex-direction: column;
    }

    .creative-brief-section {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        margin-bottom: 0 !important;
    }

    .brief-textarea {
        flex-grow: 1;
        height: 100% !important;
        min-height: 120px;
    }
}

.slot-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.9);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 5;
    justify-content: center;
}

.upload-slot:hover .slot-actions-overlay {
    opacity: 1;
    visibility: visible;
}

.upload-slot.has-image .slot-actions-overlay {
    display: none !important;
}

.slot-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    transition: all 0.2s ease;
}

.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.progress-bar {
    height: 100%;
    background: var(--bs-primary);
    width: 0%;
    transition: width 0.3s ease;
}

.slot-action-btn:hover {
    background: var(--bs-primary);
    color: #1a2025;
    border-color: var(--bs-primary);
}

.slot-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.slot-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.2s ease;
}

.upload-slot.has-image .slot-remove {
    display: flex;
}

.upload-slot.has-image:hover .slot-remove {
    background: #ff4747;
}

.upload-slot.has-image .slot-icon,
.upload-slot.has-image .slot-label {
    display: none;
}

/* Tip Banner Refinement */
.tip-banner {
    background: rgba(193, 255, 114, 0.05);
    border: 1px solid rgba(193, 255, 114, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tip-banner iconify-icon {
    font-size: 1.5rem;
    color: var(--bs-primary);
}

/* Stepper Check Icon */
.step-check-icon {
    font-size: 1.25rem;
    color: #1a2025;
}

/* Result Area */
.ad-result-img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

.scene-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Animations */
.step-pane {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carousel Nav */
.carousel-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.carousel-nav-btn:hover:not(:disabled) {
    background: var(--bs-primary);
    color: #1a2025;
    border-color: var(--bs-primary);
    transform: scale(1.1);
}

.carousel-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background: var(--bs-primary);
    width: 18px;
    border-radius: 10px;
}

.btn-remove-section {
    background: rgba(255, 71, 71, 0.1);
    color: #ff4747;
    border: 1px solid rgba(255, 71, 71, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-remove-section:hover {
    background: #ff4747;
    color: white;
}

.transition-transform {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-300 {
    transition-duration: 300ms;
}

/* Subject Section Layout */
.subject-section {
    background: transparent !important;
}

.subject-section .creative-brief-section {
    position: relative;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.carousel-viewport {
    background: transparent !important;
}

.carousel-controls-left {
    margin-top: 1rem;
}

/* Step 2: Compact layout for reference assets */
#step-content-2 .step-pane-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.25rem;
    align-items: start !important;
}

#step-content-2 #subject-carousel-wrapper {
    position: relative;
}

#step-content-2 .creative-brief-section {
    padding: 1rem;
}

#step-content-2 .brief-textarea {
    min-height: 200px;
    height: 200px !important;
}

#step-content-2 .upload-column {
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#step-content-2 .upload-slots-grid {
    grid-template-columns: minmax(0, 1fr);
}

#step-content-2 .upload-slot {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    height: 200px;
}

#step-content-2 .carousel-nav-header {
    margin-bottom: 0.75rem !important;
}

@media (max-width: 991px) {
    .stepper-layout-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stepper-sidebar {
        display: none;
    }

    .step-2-layout {
        grid-template-columns: 1fr;
    }

    .step-2-left {
        position: static;
    }

    .subject-type-tabs-vertical {
        flex-direction: row;
        flex-wrap: wrap;
    }

    #step-content-2 .step-pane-grid {
        grid-template-columns: 1fr;
    }

    #step-content-2 .upload-column {
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .welcome-container.flow-active {
        padding-top: 90px;
        padding-bottom: 40px;
    }

    .step-content-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .step-content-container {
        padding: 0 !important;
    }

    .step-content-card {
        padding: 1rem;
    }

    .step-header-title {
        font-size: 1.4rem;
    }

    .creative-brief-section,
    .directive-accordion,
    .scene-box,
    .subject-section .creative-brief-section {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .subject-tab {
        width: 100%;
        min-width: 0;
    }

    .upload-slots-grid {
        grid-template-columns: 1fr;
    }

    .slot-action-btn {
        min-width: 0;
        width: 100%;
    }

    #step-nav {
        flex-direction: column;
        gap: 0.75rem;
        position: static;
        background: transparent;
        padding-top: 0;
    }

    #btn-next,
    #btn-prev {
        width: 100%;
        justify-content: center;
    }

    #btn-prev {
        display: inline-flex;
        align-items: center;
        padding: 0.75rem 1.5rem;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 999px;
        color: #ffffff;
        background: transparent;
    }

    #btn-prev:hover {
        border-color: #ffffff;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
    }


    .step-pane .d-flex.align-items-center.gap-3.mb-2 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .step-pane .d-flex.align-items-center.gap-3.mb-2 iconify-icon {
        display: none;
    }

    .step-header-desc {
        margin-bottom: 0.75rem;
    }

    .step-pane-grid {
        margin-top: 0.75rem !important;
    }

    /* Larger text areas, smaller image slots on mobile */
    #step-content-1 .brief-textarea,
    #step-content-2 .brief-textarea {
        min-height: 220px;
        height: 220px;
    }

    #step-content-1 .upload-slot,
    #step-content-1 .upload-slots-grid .upload-slot {
        height: 120px;
        min-height: 120px;
    }

    #step-content-2 .upload-slot,
    #step-content-2 .upload-slots-grid .upload-slot {
        height: 120px;
        min-height: 120px;
    }
}








