/* ==========================================================================
   BizzaWP — AI Project Builder
   Extends the existing project-builder.css styles.
   Variables: navy #1e3144 | gold #bd872f | bg #f8f6f2
   ========================================================================== */

.bab-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: inherit;
    position: relative;
}

/* ── Chip selected state (project-builder.css uses is-active; we use is-selected) */

.bzb-chip.is-selected {
    background: #1e3144;
    border-color: #1e3144;
    color: #fff;
}

/* ── Steps ─────────────────────────────────────────────────────────────── */

.bab-step { display: none; }
.bab-step.is-active { display: block; }

/* ── Product cards (reuse .bzb-product-card styles) ─────────────────── */

.bab-orientation-wrap {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e8e2d9;
}

.bab-field-hint {
    font-size: 13px;
    color: #5a6978;
    margin: 4px 0 10px;
}

/* ── Step nav ───────────────────────────────────────────────────────────── */

.bab-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8e2d9;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.bab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    text-decoration: none;
    line-height: 1;
}

.bab-btn--primary {
    background: #1e3144;
    color: #fff;
    border-color: #1e3144;
}
.bab-btn--primary:hover { background: #bd872f; border-color: #bd872f; }

.bab-btn--ghost {
    background: transparent;
    color: #5a6978;
    border-color: #c8cdd3;
}
.bab-btn--ghost:hover { border-color: #1e3144; color: #1e3144; }

.bab-btn--generate {
    background: #bd872f;
    color: #fff;
    border-color: #bd872f;
    font-size: 16px;
    padding: 13px 28px;
}
.bab-btn--generate:hover { background: #a67228; border-color: #a67228; }
.bab-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Prompt step ────────────────────────────────────────────────────────── */

.bab-prompt-tips {
    background: #f0f4f8;
    border-left: 4px solid #bd872f;
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1e3144;
}
.bab-prompt-tips ul {
    margin: 8px 0 0;
    padding-left: 18px;
}
.bab-prompt-tips li { margin-bottom: 4px; }

.bzb-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d0d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    color: #1e3144;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.bzb-field textarea:focus { border-color: #1e3144; outline: none; }

.bab-char-count {
    font-size: 12px;
    color: #8a96a3;
    text-align: right;
    margin-top: 4px;
}

/* ── Voice picker ───────────────────────────────────────────────────────── */

.bab-voice-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bab-filter-chip {
    padding: 6px 16px;
    border: 1.5px solid #d0d5db;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #5a6978;
    transition: all 0.15s;
}
.bab-filter-chip.is-active,
.bab-filter-chip:hover {
    border-color: #1e3144;
    color: #1e3144;
    background: #f0f4f8;
}

.bab-voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.bab-voice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 2px solid #e0e5ea;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.bab-voice-card:hover { border-color: #bd872f; background: #fffaf4; }
.bab-voice-card.is-selected { border-color: #1e3144; background: #f0f4f8; }

.bab-voice-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bab-voice-card__info strong { font-size: 14px; color: #1e3144; }
.bab-voice-card__info span   { font-size: 12px; color: #5a6978; }
.bab-voice-card__info em     { font-size: 11px; color: #8a96a3; font-style: normal; text-transform: capitalize; }

.bab-voice-preview {
    background: #f0f4f8;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 12px;
    color: #1e3144;
    flex-shrink: 0;
    transition: background 0.15s;
}
.bab-voice-preview:hover { background: #bd872f; color: #fff; }
.bab-voice-preview:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Mood grid ──────────────────────────────────────────────────────────── */

.bab-moods-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.bab-mood-chip {
    padding: 8px 16px;
    border: 1.5px solid #d0d5db;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #5a6978;
    transition: all 0.15s;
    white-space: nowrap;
}
.bab-mood-chip:hover { border-color: #bd872f; color: #bd872f; }
.bab-mood-chip.is-selected {
    border-color: #1e3144;
    background: #1e3144;
    color: #fff;
}

/* ── Contact form grid ──────────────────────────────────────────────────── */

.bab-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 560px) {
    .bab-contact-grid { grid-template-columns: 1fr; }
}

.bzb-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e3144;
    margin-bottom: 5px;
}
.bab-req { color: #c0392b; }

.bzb-field input[type="text"],
.bzb-field input[type="email"],
.bzb-field input[type="tel"],
.bzb-field input[type="number"],
.bzb-field input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d0d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1e3144;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.bzb-field input:focus { border-color: #1e3144; outline: none; }

/* ── Summary ────────────────────────────────────────────────────────────── */

.bab-summary {
    background: #f7f6f2;
    border: 1px solid #e8e2d9;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 8px;
}
.bab-summary h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a96a3;
    margin: 0 0 12px;
}
.bab-summary-grid { display: flex; flex-direction: column; gap: 6px; }
.bab-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.bab-summary-row span { color: #5a6978; }
.bab-summary-row strong { color: #1e3144; }

/* ── Generating overlay ─────────────────────────────────────────────────── */

.bab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 49, 68, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bab-overlay__inner {
    background: #fff;
    border-radius: 12px;
    padding: 40px 48px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 16px 60px rgba(0,0,0,0.3);
}
.bab-overlay__inner h3 {
    font-size: 20px;
    color: #1e3144;
    margin: 18px 0 8px;
}
.bab-overlay__inner p { font-size: 14px; color: #5a6978; margin: 0 0 24px; }

.bab-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e8e2d9;
    border-top-color: #bd872f;
    border-radius: 50%;
    animation: bab-spin 0.9s linear infinite;
    margin: 0 auto;
}
@keyframes bab-spin { to { transform: rotate(360deg); } }

.bab-progress-bar-wrap {
    height: 6px;
    background: #e8e2d9;
    border-radius: 3px;
    overflow: hidden;
}
.bab-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #bd872f, #d4a044);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ── Preview modal ──────────────────────────────────────────────────────── */

.bab-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bab-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}
.bab-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 700px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 60px rgba(0,0,0,0.4);
}
.bab-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e8e2d9;
}
.bab-modal__header h3 { font-size: 17px; color: #1e3144; margin: 0; }
.bab-modal__close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #8a96a3;
    line-height: 1;
    padding: 0;
}
.bab-modal__close:hover { color: #1e3144; }
.bab-modal__video-wrap { padding: 0; background: #000; }
.bab-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-top: 1px solid #e8e2d9;
    gap: 12px;
}

/* ── Success ────────────────────────────────────────────────────────────── */

.bab-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    gap: 12px;
}
.bab-success h2 { font-size: 26px; color: #1e3144; margin: 0; }
.bab-success p  { font-size: 16px; color: #5a6978; margin: 0; }

/* ── Post-generation section ────────────────────────────────────────────── */

.bab-postgen-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e2d9;
}
.bab-postgen-header h2 {
    font-size: 22px;
    color: #1e3144;
    margin: 0 0 4px;
}
.bab-postgen-header p {
    font-size: 13px;
    color: #5a6978;
    margin: 0;
}

.bab-postgen-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
}

@media (max-width: 680px) {
    .bab-postgen-preview { grid-template-columns: 1fr; }
    .bab-postgen-header { flex-direction: column; }
}

.bab-postgen-3d {
    display: flex;
    flex-direction: column;
}

.bab-postgen-contact {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e8e2d9;
}
.bab-postgen-contact h3 {
    font-size: 17px;
    color: #1e3144;
    margin: 0 0 4px;
}

/* ── AI face card ───────────────────────────────────────────────────────── */

.bab-ai-face {
    border-color: #bd872f !important;
    background: #fffaf4 !important;
    cursor: default;
}

.bab-ai-thumb {
    background: #fdf2e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.bab-ai-badge {
    font-size: 11px;
    font-weight: 700;
    color: #bd872f;
    background: #fdf2e0;
    border: 1px solid #f0d49a;
    border-radius: 12px;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Word count over-limit indicator */
#bab-prompt-chars {
    transition: color 0.15s;
}

/* ── Misc ───────────────────────────────────────────────────────────────── */

.bab-loading-msg { color: #8a96a3; font-size: 14px; padding: 20px 0; }
.bab-error-msg   { color: #c0392b; font-size: 14px; }
.bab-field-error {
    background: #fff3f3;
    border: 1px solid #fcc;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-top: 12px;
}

/* ── Brand Kit Step ─────────────────────────────────────────────────────── */

.bab-brand-explainer {
    background: #f0f4f8;
    border-left: 4px solid #bd872f;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.bab-brand-explainer h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1e3144;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bab-brand-explainer p {
    font-size: 13px;
    color: #32485a;
    line-height: 1.7;
    margin: 0 0 8px;
}

.bab-brand-explainer p:last-child { margin-bottom: 0; }

/* Logo upload */
.bab-logo-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.bab-logo-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 240px;
    padding: 28px 20px;
    border: 2px dashed #c8d0d8;
    border-radius: 10px;
    background: #fafbfc;
    color: #5a6978;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.bab-logo-drop:hover {
    border-color: #bd872f;
    background: #fffaf4;
    color: #1e3144;
}

.bab-logo-drop__hint {
    font-size: 11px;
    color: #8a96a3;
    font-weight: 400;
}

.bab-logo-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
}

.bab-logo-preview img {
    max-height: 56px;
    max-width: 180px;
    border-radius: 4px;
    display: block;
}

.bab-logo-remove {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #c0392b;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 10px;
    transition: background 0.15s;
}

.bab-logo-remove:hover { background: #fff3f3; }

/* Colors row */
.bab-brand-colors-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 4px;
}

.bab-color-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bab-color-swatch {
    width: 40px;
    height: 40px;
    border: 2px solid #dfe3e8;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    flex-shrink: 0;
    background: none;
}

.bab-color-hex {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    width: 100px;
    padding: 8px 10px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    color: #1e3144;
}

.bab-optional {
    font-weight: 400;
    color: #8a96a3;
    font-size: 13px;
}

@media (max-width: 560px) {
    .bab-brand-colors-row { grid-template-columns: 1fr; }
    .bab-logo-drop { width: 100%; }
}

