/* ── CallConnectAI Report Gate – Frontend Styles ─────────────── */
#ccai-root *, #ccai-root *::before, #ccai-root *::after { box-sizing: border-box; }

#ccai-root {
    --navy:       #0B1929;
    --brand:      #1A4F8A;
    --accent:     #2E75B6;
    --sky:        #5BA3D9;
    --pale:       #D6E4F0;
    --green:      #1A6B3A;
    --orange:     #C25E00;
    --teal:       #0D6E6E;
    --gold:       #B8860B;
    /* light surfaces */
    --surface:    #FFFFFF;
    --surface-2:  #F4F8FC;
    --surface-3:  #EBF4FB;
    --border:     #C8DCEE;
    --text-dark:  #1A2B3C;
    --text-mid:   #4A6580;
    --text-light: #7A96AE;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--surface-2);
    color: var(--text-dark);
    border-radius: 12px;
    overflow: hidden;
}

/* Body wrapper */
.ccai-body { max-width: 800px; margin: 0 auto; padding: 28px 18px 60px; }

/* ── Hero — keeps brand colour as it's a visual anchor ── */
.ccai-hero {
    background: linear-gradient(135deg, var(--brand) 0%, #1a6aaa 100%);
    border-radius: 12px; padding: 32px 28px;
    margin-bottom: 22px; position: relative; overflow: hidden;
}
.ccai-hero::after {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,.07); pointer-events: none;
}
.ccai-eyebrow { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.75); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.ccai-hero h2  { margin: 0 0 10px; font-size: 26px; font-weight: 800; line-height: 1.2; color: #fff; }
.ccai-hero p   { margin: 0 0 18px; font-size: 13.5px; color: rgba(255,255,255,.85); line-height: 1.65; max-width: 500px; }
.ccai-tags     { display: flex; gap: 8px; flex-wrap: wrap; }
.ccai-tag {
    padding: 3px 10px; border-radius: 20px;
    background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35);
    font-size: 11px; color: #fff; font-weight: 600;
}

/* ── Stats row ── */
.ccai-stats {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 8px; margin-bottom: 20px;
}
.ccai-stat-card {
    background: var(--surface); border-radius: 8px;
    padding: 14px 10px; text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ccai-stat-val   { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.ccai-stat-label { font-size: 10px; color: var(--text-light); line-height: 1.3; }

/* ── Sections accordion ── */
.ccai-sections-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden; margin-bottom: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.ccai-sections-head {
    padding: 13px 18px; border-bottom: 1px solid var(--border);
    font-size: 11px; font-weight: 700; color: var(--brand);
    text-transform: uppercase; letter-spacing: 1px;
    background: var(--surface-3);
}
.ccai-section-row { border-bottom: 1px solid var(--border); }
.ccai-section-row:last-child { border-bottom: none; }
.ccai-section-header {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px; cursor: pointer; user-select: none;
    transition: background .15s;
}
.ccai-section-header:hover { background: var(--surface-3); }
.ccai-section-icon {
    width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.ccai-section-meta  { flex: 1; }
.ccai-section-title { font-size: 12px; font-weight: 700; color: var(--text-dark); }
.ccai-section-hl    { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.ccai-section-chevron { color: var(--text-light); font-size: 11px; margin-left: auto; }
.ccai-section-body {
    display: none; padding: 12px 18px 14px 62px;
    font-size: 11px; color: var(--text-mid); line-height: 1.6;
    background: var(--surface-2); border-top: 1px solid var(--border);
}
.ccai-section-body.open { display: block; }
.ccai-section-hl-open   { font-size: 11px; font-weight: 700; margin-bottom: 6px; }

/* ── Download CTA banner ── */
.ccai-cta-banner {
    background: linear-gradient(135deg, var(--brand) 0%, #0e3460 100%);
    border-radius: 10px; padding: 24px 26px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
.ccai-cta-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: #fff; }
.ccai-cta-sub   { font-size: 12px; color: rgba(255,255,255,.8); }

/* ── Buttons ── */
.ccai-btn-primary {
    padding: 12px 28px; background: var(--sky);
    border: none; border-radius: 8px; color: #fff;
    font-size: 14px; font-weight: 800; cursor: pointer;
    white-space: nowrap; font-family: inherit; transition: opacity .15s;
}
.ccai-btn-primary:hover { opacity: .88; }

.ccai-btn-outline {
    padding: 10px 22px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--brand); font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: background .15s;
}
.ccai-btn-outline:hover { background: var(--surface-3); }
.ccai-btn-outline.primary {
    background: var(--brand); border-color: var(--brand); color: #fff;
}
.ccai-btn-outline.primary:hover { opacity: .88; background: var(--brand); }

/* ── Form ── */
.ccai-form-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 30px 26px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ccai-back-btn {
    background: none; border: none; color: var(--brand);
    cursor: pointer; font-size: 12px; padding: 0;
    margin-bottom: 18px; font-family: inherit;
}
.ccai-back-btn:hover { text-decoration: underline; }
.ccai-form-eyebrow { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.ccai-form-title   { margin: 0 0 6px; font-size: 21px; font-weight: 800; color: var(--text-dark); }
.ccai-form-desc    { margin: 0 0 24px; font-size: 13px; color: var(--text-mid); line-height: 1.5; }
.ccai-grid         { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

.ccai-field label {
    display: block; font-size: 10px; font-weight: 700;
    color: var(--brand); text-transform: uppercase;
    letter-spacing: .5px; margin-bottom: 4px;
}

/* ── Inputs & selects — light ── */
.ccai-field input,
.ccai-field select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dark);
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.ccai-field input::placeholder { color: var(--text-light); }
.ccai-field input:focus,
.ccai-field select:focus {
    border-color: var(--sky);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(91,163,217,.18);
}
.ccai-field.has-error input,
.ccai-field.has-error select { border-color: #C0392B; }
.ccai-field-error { font-size: 10px; color: #C0392B; margin-top: 3px; }

/* Dropdown wrapper with custom arrow */
.ccai-select-wrap { position: relative; }
.ccai-select-wrap select { padding-right: 32px; cursor: pointer; }
.ccai-select-wrap::after {
    content: '▾';
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--brand); font-size: 13px;
    pointer-events: none;
}

.ccai-privacy {
    font-size: 10px; color: var(--text-light); line-height: 1.5;
    padding: 10px 14px; background: var(--surface-3);
    border-radius: 6px; border-left: 3px solid var(--brand);
    margin-bottom: 18px;
}

.ccai-submit {
    width: 100%; padding: 14px; background: var(--brand);
    border: none; border-radius: 8px; color: #fff;
    font-size: 15px; font-weight: 800; cursor: pointer;
    font-family: inherit; transition: opacity .15s;
}
.ccai-submit:hover    { opacity: .88; }
.ccai-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Generating spinner ── */
.ccai-generating { text-align: center; padding: 80px 20px; background: var(--surface-2); }
.ccai-spinner {
    width: 56px; height: 56px; border-radius: 50%;
    border: 3px solid var(--pale); border-top-color: var(--brand);
    margin: 0 auto 22px;
    animation: ccai-spin 1s linear infinite;
}
@keyframes ccai-spin { to { transform: rotate(360deg); } }
.ccai-generating h3 { font-size: 21px; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.ccai-generating p  { color: var(--text-mid); font-size: 13px; }

/* ── Done screen ── */
.ccai-done {
    background: var(--surface);
    border: 1px solid #A8D5B5;
    border-radius: 12px; padding: 36px 28px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.ccai-check {
    width: 60px; height: 60px; border-radius: 50%;
    background: #E6F4EC; border: 2px solid var(--green);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; font-size: 26px; color: var(--green);
}
.ccai-done h3   { font-size: 23px; font-weight: 800; margin-bottom: 8px; color: var(--text-dark); }
.ccai-done p    { color: var(--text-mid); font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
.ccai-filename  {
    font-size: 12px; color: var(--brand); font-weight: 600;
    background: var(--surface-3); border: 1px solid var(--border);
    display: inline-block; padding: 6px 14px;
    border-radius: 6px; margin-bottom: 24px; word-break: break-all;
}
.ccai-done-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.ccai-next-steps {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 8px; padding: 16px 20px;
    text-align: left; display: inline-block; max-width: 460px;
}
.ccai-next-steps-title { font-size: 10px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.ccai-next-step { display: flex; gap: 8px; margin-bottom: 7px; font-size: 11px; color: var(--text-mid); }
.ccai-next-step-num { color: var(--brand); font-weight: 700; min-width: 16px; }
.ccai-restart-btn {
    background: none; border: none; color: var(--text-light);
    cursor: pointer; font-size: 12px; margin-top: 18px; font-family: inherit;
}
.ccai-restart-btn:hover { color: var(--brand); text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 580px) {
    .ccai-grid        { grid-template-columns: 1fr; }
    .ccai-stats       { grid-template-columns: repeat(2,1fr); }
    .ccai-cta-banner  { flex-direction: column; text-align: center; }
    .ccai-hero h2     { font-size: 20px; }
    .ccai-body        { padding: 20px 14px 48px; }
}
