/* ============================================================
   BrandBrahma AI Name Generator v3.0 – Public Stylesheet
   Extends the original style with auth modal, credit bar,
   top-up modal, and Search More CTA
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&display=swap');

/* ── Base font scope ──────────────────────────────────────── */
.bb-ai-search-container,
.bb-ai-search-container *,
.bb-ai-results-container,
.bb-ai-results-container *,
.bb-modal,
.bb-modal * {
    font-family: 'Roboto Condensed', sans-serif;
    box-sizing: border-box;
}

/* ── Search container ─────────────────────────────────────── */
.bb-ai-search-container {
    max-width: 960px;
    margin: 0 auto 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.bb-ai-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 60px;
    padding: 2px;
    border-radius: 60px;
    background: linear-gradient(to right, #6a82fb, #fc5c7d);
}

.bb-ai-generator-form {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 50px;
    border-radius: 60px;
    background: #fff;
    padding: 0 10px;
}

.bb-ai-search-icon { font-size: 20px; color: #a0a0a0; margin-right: 10px; flex-shrink: 0; }
.bb-ai-search-icon::before { content: "\1F50D"; }

.bb-ai-generator-form input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    padding: 0 10px;
}
.bb-ai-generator-form input[type="text"]::placeholder { color: #a0a0a0; }

.bb-ai-generator-form button[type="submit"] {
    flex-shrink: 0;
    height: 50px;
    padding: 0 30px;
    background: linear-gradient(to right, #fc5c7d, #ff8c00);
    color: #fff;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
    transition: background .3s;
    white-space: nowrap;
}
.bb-ai-generator-form button[type="submit"]:hover { background: linear-gradient(to right, #ff8c00, #fc5c7d); }
.bb-ai-generator-form button[type="submit"]:disabled { opacity:.6; cursor:not-allowed; }

/* ── Credit / guest status bar ────────────────────────────── */
.bb-ai-credit-bar,
.bb-ai-guest-notice {
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    color: #555;
}
.bb-ai-guest-notice { justify-content: center; }
.bb-ai-guest-notice a { color: #6a82fb; font-weight: 700; text-decoration: none; }
.bb-ai-guest-notice a:hover { text-decoration: underline; }
.bb-ai-credit-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bb-free-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg,#43e97b,#38f9d7);
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.bb-credit-badge {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg,#6a82fb,#fc5c7d);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.bb-topup-link {
    color: #fc5c7d;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}
.bb-topup-link:hover { text-decoration: underline; }

/* ── Loading ──────────────────────────────────────────────── */
.bb-ai-loading-msg {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #6a82fb;
    font-weight: 600;
}

/* ── Results container ────────────────────────────────────── */
.bb-ai-results-container {
    width: 100%;
    padding: 40px 20px;
    max-width: 100%;
}

.results-title {
    color: #E0720A;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 28px;
    text-align: center;
    margin: 0 0 20px;
}
.results-title em { font-style: italic; color: #6a82fb; }

/* ── Suggestion grid ──────────────────────────────────────── */
.suggestions-grid-container { padding: 10px; }

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
@media (max-width: 1024px) { .suggestions-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width:  768px) { .suggestions-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:  480px) { .suggestions-grid { grid-template-columns: 1fr; } }

.suggestion-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    color: #201E22;
    box-shadow: 0 2px 5px rgba(0,0,0,.05);
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    word-break: break-word;
}
.suggestion-item:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,.1); }
.suggestion-item a { color: inherit; text-decoration: none; }
.suggestion-item a:hover { color: #6a82fb; }

/* ── Load More ────────────────────────────────────────────── */
.bb-load-more-btn {
    display: block;
    width: fit-content;
    margin: 30px auto 0;
    padding: 12px 28px;
    background: linear-gradient(to right, #6a82fb, #fc5c7d);
    color: #fff;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
    transition: background .3s, transform .2s;
}
.bb-load-more-btn:hover { background: linear-gradient(to right, #fc5c7d, #6a82fb); transform: translateY(-1px); }

/* ── Search More CTA ──────────────────────────────────────── */
.bb-search-more-wrap {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #e0e0e0;
}
.bb-search-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 60px;
    background: linear-gradient(to right, #fc5c7d, #ff8c00);
    color: #fff;
    box-shadow: 0 4px 12px rgba(252,92,125,.3);
    transition: all .25s;
}
.bb-search-more-btn:hover { background: linear-gradient(to right, #ff8c00, #fc5c7d); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(252,92,125,.4); }
.bb-search-more-btn:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.bb-search-more-btn small { font-size: 12px; opacity: .85; }

/* ── Primary button (shared) ──────────────────────────────── */
.bb-btn-primary {
    display: inline-block;
    padding: 13px 28px;
    background: linear-gradient(to right, #fc5c7d, #ff8c00);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: background .3s, transform .2s;
    line-height: 1.3;
}
.bb-btn-primary:hover { background: linear-gradient(to right, #ff8c00, #fc5c7d); transform: translateY(-1px); }
.bb-btn-primary:disabled { opacity:.6; cursor:not-allowed; transform:none; }

/* ── Modals (shared base) ─────────────────────────────────── */
body.bb-modal-open { overflow: hidden; }

.bb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bb-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(3px);
}

.bb-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: bb-modal-in .25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes bb-modal-in {
    from { opacity:0; transform:translateY(24px) scale(.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

.bb-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color .2s;
}
.bb-modal-close:hover { color: #333; }

/* ── Auth modal tabs ──────────────────────────────────────── */
.bb-auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}
.bb-auth-tab {
    background: none;
    border: none;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.bb-auth-tab.active { color: #E0720A; border-bottom-color: #E0720A; }
.bb-auth-tab:hover:not(.active) { color: #555; }

.bb-auth-pane h3 { margin: 0 0 6px; font-size: 20px; color: #222; }
.bb-auth-sub { color: #888; font-size: 13px; margin: 0 0 20px; }

.bb-field-group { margin-bottom: 16px; }
.bb-field-group label { display:block; font-size:13px; font-weight:600; color:#444; margin-bottom:6px; }
.bb-field-group input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: border-color .2s;
    font-family: 'Roboto Condensed', sans-serif;
}
.bb-field-group input:focus { border-color: #6a82fb; }

.bb-auth-error {
    color: #dc2626;
    font-size: 13px;
    margin: 8px 0 12px;
    min-height: 18px;
}

.bb-auth-pane .bb-btn-primary { width: 100%; margin-top: 4px; font-size: 15px; padding: 13px; }

.bb-auth-footer { text-align: center; font-size: 12px; color: #aaa; margin-top: 14px; }
.bb-auth-footer a { color: #6a82fb; text-decoration: none; }
.bb-auth-footer a:hover { text-decoration: underline; }

/* reCAPTCHA inside modal */
.bb-auth-pane .g-recaptcha { margin: 12px 0; transform-origin: left top; }
@media (max-width: 420px) {
    .bb-auth-pane .g-recaptcha { transform: scale(.85); }
}

/* ── Top-Up modal ─────────────────────────────────────────── */
.bb-topup-box { text-align: center; padding: 44px 40px; }
.bb-topup-icon { font-size: 48px; margin-bottom: 12px; line-height: 1; }
.bb-topup-box h3 { font-size: 22px; color: #222; margin: 0 0 10px; }
.bb-topup-box p { color: #666; font-size: 15px; margin: 0 0 8px; }
.bb-topup-balance { font-size: 14px !important; color: #888 !important; }
.bb-topup-btn { display: block; width: 100%; margin: 20px 0 0; font-size: 16px; }
.bb-topup-note { font-size: 12px !important; color: #aaa !important; margin-top: 12px !important; }

/* ── Responsive modal ─────────────────────────────────────── */
@media (max-width: 520px) {
    .bb-modal-box { padding: 28px 22px; border-radius: 12px; }
    .bb-topup-box  { padding: 32px 20px; }
    .bb-auth-tab   { padding: 10px 14px; font-size: 14px; }
}

/* ── Original loading / error states ─────────────────────── */
#bb-ai-loading { text-align:center; padding:20px; font-size:18px; color:#6a82fb; font-weight:600; }
.error-message { color:#d32f2f; font-weight:700; text-align:center; padding:10px; background:#ffebee; border-radius:8px; margin:20px 0; }

/* ════════════════════════════════════════════════════════════════════
   Generate More Ideas CTA card  (replaces Load More + Search More)
════════════════════════════════════════════════════════════════════ */
.bb-generate-more-wrap {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px dashed #f0e8ff;
    text-align: center;
}

.bb-generate-more-card {
    display: inline-block;
    background: linear-gradient(135deg, #f8f4ff 0%, #fff4f8 100%);
    border: 1.5px solid #e8d5f5;
    border-radius: 16px;
    padding: 24px 36px 20px;
    max-width: 420px;
    width: 100%;
}

.bb-generate-more-label {
    font-size: 13px;
    color: #9b7ec8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 0 0 14px;
}

.bb-generate-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    font-family: 'Roboto Condensed', sans-serif;
    box-shadow: 0 6px 20px rgba(124,58,237,.30);
    transition: all .25s;
    min-width: 220px;
}
.bb-generate-more-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #a21caf);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124,58,237,.40);
}
.bb-generate-more-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner inside button */
.bb-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bb-spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes bb-spin { to { transform: rotate(360deg); } }

.bb-generate-more-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 0;
    font-size: 12px;
    color: #a78bca;
}

.bb-cost-badge {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

/* ════════════════════════════════════════════════════════════════════
   Charge confirmation toast  (bottom-right, appears after deduction)
════════════════════════════════════════════════════════════════════ */
.bb-charge-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.28);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    max-width: 340px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}
.bb-charge-toast.bb-toast-visible {
    opacity: 1;
    transform: translateY(0);
}
.bb-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}
.bb-toast-msg strong {
    color: #a78bfa;
}

/* ── Remove any legacy load-more / search-more references ─────────── */
.bb-load-more-btn   { display: none !important; }
.bb-search-more-btn { display: none !important; }
.bb-search-more-wrap{ display: none !important; }
