/* Reset only within our wrapper to avoid conflicts with Impreza/WPBakery */
.vibe-builder-wrapper *,
.vibe-builder-wrapper *::before,
.vibe-builder-wrapper *::after {
    box-sizing: border-box;
}

/* Override WPBakery .w-html container which collapses height */
.w-html .vibe-builder-wrapper,
.wpb_text_column .vibe-builder-wrapper,
.vc_column-inner .vibe-builder-wrapper {
    width: 100% !important;
    display: block !important;
}

.vibe-builder-wrapper {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    display: block;
}

.prompt-container {
    width: 100%;
    max-width: 1100px;
    background: linear-gradient(135deg, rgba(107, 142, 142, 0.5) 0%, rgba(82, 138, 153, 0.5) 30%, rgba(58, 112, 153, 0.5) 100%);
    border-radius: 28px;
    padding: 55px 50px 60px 50px;
    backdrop-filter: blur(10px);
    border: none;
    position: relative;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 40px rgba(128, 203, 196, 0.08);
}

/* Animated glowing border */
.prompt-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(128, 203, 196, 0.6) 30%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(128, 203, 196, 0.5) 70%,
        rgba(255, 255, 255, 0.55) 100%
    );
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 6s ease infinite;
    pointer-events: none;
}

/* Outer glow */
.prompt-container::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: transparent;
    box-shadow: 0 0 25px rgba(128, 203, 196, 0.2), 0 0 60px rgba(128, 203, 196, 0.08);
    pointer-events: none;
    z-index: -1;
}

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


.prompt-text-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.vibe-builder-wrapper .prompt-input-field,
.vibe-builder-wrapper textarea#websitePrompt {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 26px !important;
    font-weight: 300 !important;
    font-family: 'Montserrat', sans-serif !important;
    line-height: 1.5 !important;
    letter-spacing: -0.3px !important;
    resize: none !important;
    outline: none !important;
    min-height: 200px !important;
    height: 200px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    display: block !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.prompt-input-field::-webkit-scrollbar {
    width: 6px;
}

.prompt-input-field::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.prompt-input-field::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.prompt-input-field::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.prompt-input-field::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.prompt-input-field:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-section {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 20px;
    justify-content: space-between;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.add-button {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.add-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.add-button::before,
.add-button::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
}

.add-button::before {
    width: 18px;
    height: 2px;
}

.add-button::after {
    width: 2px;
    height: 18px;
}

.file-input {
    display: none;
}

.uploaded-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: -20px;
}

.file-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 12px 6px 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s ease;
}

.file-chip:hover {
    background: rgba(255, 255, 255, 0.18);
}

.file-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 10px;
}

.file-thumbnail {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}

.file-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.file-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ── Planning Mode Wizard ── */
.planning-mode-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 40, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.planning-mode-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wizard-container {
    width: 100%;
    max-width: 640px;
    background: linear-gradient(135deg, rgba(107,142,142,0.97) 0%, rgba(58,112,153,0.97) 100%);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.35s ease;
}

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

/* Header */
.wizard-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.wizard-meta {
    flex-shrink: 0;
}

.wizard-step-count {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.wizard-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 99px;
    overflow: hidden;
}

.wizard-progress-fill {
    height: 100%;
    background: #80cbc4;
    border-radius: 99px;
    transition: width 0.4s ease;
    width: 0%;
}

.close-chat {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.close-chat:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* Body */
.wizard-body {
    padding: 36px 32px 24px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wizard-step {
    animation: stepIn 0.3s ease;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

.wizard-question {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: white;
    line-height: 1.4;
    margin-bottom: 28px;
}

/* Text input */
.wizard-text-input {
    width: 100%;
    background: rgba(255,255,255,0.12) !important;
    border: 2px solid rgba(255,255,255,0.25) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    color: white !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
    display: block !important;
}

.wizard-text-input:focus {
    border-color: #80cbc4 !important;
    background: rgba(255,255,255,0.18) !important;
}

.wizard-text-input::placeholder {
    color: rgba(255,255,255,0.45) !important;
}

.wizard-hint {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
}

/* Options grid */
.wizard-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.wizard-options::-webkit-scrollbar { width: 4px; }
.wizard-options::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 2px; }
.wizard-options::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }

.wizard-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: white;
    text-align: left;
    width: 100%;
    user-select: none;
}

.wizard-option:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.35);
}

.wizard-option.selected {
    background: rgba(128,203,196,0.25);
    border-color: #80cbc4;
}

.wizard-option-check {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wizard-option.selected .wizard-option-check {
    background: #80cbc4;
    border-color: #80cbc4;
}

.wizard-option-check::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.wizard-option.selected .wizard-option-check::after {
    opacity: 1;
}

/* Single select — radio style */
.wizard-option.radio .wizard-option-check {
    border-radius: 50%;
}

/* Multi select — square style */
.wizard-option.checkbox .wizard-option-check {
    border-radius: 5px;
}

.wizard-option.checkbox.selected .wizard-option-check::after {
    content: '✓';
    font-size: 13px;
    font-weight: 700;
    width: auto;
    height: auto;
    background: none;
    opacity: 1;
    color: white;
}

/* Footer */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
    gap: 16px;
}

.wizard-back {
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}

.wizard-back:hover {
    color: rgba(255,255,255,0.85);
}

.wizard-back:disabled {
    opacity: 0;
    pointer-events: none;
}

.wizard-skip {
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wizard-skip:hover {
    color: rgba(255,255,255,0.85);
}

.wizard-next {
    background: #80cbc4;
    border: none;
    border-radius: 50px;
    padding: 14px 36px;
    color: #1a1f3a;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(128,203,196,0.35);
    letter-spacing: 0.3px;
}

.wizard-next:hover {
    background: #6bbfb8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128,203,196,0.5);
}

.wizard-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Summary step */
.wizard-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wizard-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
}

.wizard-summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #80cbc4;
    min-width: 90px;
    padding-top: 1px;
}

.wizard-summary-value {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
}

@media (max-width: 600px) {
    .wizard-container { border-radius: 16px; }
    .wizard-body { padding: 28px 20px 20px; min-height: 240px; }
    .wizard-footer { padding: 14px 20px 20px; }
    .wizard-question { font-size: 18px; margin-bottom: 20px; }
}

    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.vibe-builder-wrapper .left-controls {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 18px !important;
    flex: 1;
}

.vibe-builder-wrapper .toggle-section {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1;
    max-width: 280px;
}

.toggle-wrapper {
    position: relative;
    width: 60px;
    height: 32px;
    flex-shrink: 0;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 34px;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

.toggle-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.3px;
    user-select: none;
    white-space: nowrap;
}

.lets-go-button {
    background: #80cbc4;
    border: none;
    border-radius: 50px;
    padding: 16px 40px;
    color: #1a1f3a;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(128, 203, 196, 0.3);
}

.lets-go-button:hover {
    background: #6bbfb8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 203, 196, 0.45);
}

.lets-go-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(128, 203, 196, 0.3);
}

.icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Refresh/sparkle icon */
.sparkle-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.sparkle-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    display: block;
}

@media (max-width: 768px) {
    .prompt-container {
        padding: 40px 30px;
    }

    .prompt-text {
        font-size: 24px;
    }

    .input-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-top: 70px;
    }

    .left-controls {
        flex-direction: column;
        gap: 15px;
    }

    .toggle-section {
        max-width: 100%;
        width: 100%;
    }

    .lets-go-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .prompt-text {
        font-size: 20px;
    }
}
