/* ============================================================
   Free Consultation Chat — Avatar Launcher + Chatbox
   File: public/assets/css/free-consultation-chat.css?v=1.1
   ============================================================ */

/* ── Avatar Launcher ───────────────────────────────────────── */
.fcc-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 9990;
    animation: fccSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fcc-need-help {
    background: #1e3a5f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px 20px 4px 20px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    cursor: pointer;
    /* Hidden by default */
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

/* Only show on hover for devices with a real mouse (not touch) */
@media (hover: hover) and (pointer: fine) {
    .fcc-launcher:hover .fcc-need-help {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

.fcc-avatar-wrap {
    position: relative;
    width: 62px;
    height: 62px;
    cursor: pointer;
    flex-shrink: 0;
}

.fcc-avatar-wrap:hover .fcc-avatar {
    transform: scale(1.06);
}

.fcc-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1e3a5f;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    display: block;
}

/* Phone icon badge — bottom-left of avatar */
.fcc-avatar-phone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.fcc-avatar-phone svg {
    width: 11px;
    height: 11px;
}

/* ── Chatbox ───────────────────────────────────────────────── */
.fcc-chatbox {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 340px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    z-index: 9991;
    overflow: hidden;
    animation: fccSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
}

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

/* ── Header ────────────────────────────────────────────────── */
.fcc-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #162d4a 100%);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fcc-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcc-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.fcc-header-title {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fcc-header-phone {
    width: 14px;
    height: 14px;
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
}

.fcc-header-online {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
}

.fcc-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.fcc-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.fcc-close:hover {
    color: #fff;
}

/* ── Teaser banner (above step 1) ──────────────────────────── */
.fcc-teaser {
    background: #eef2ff;
    border-bottom: 1px solid #e0e7ff;
    padding: 10px 16px;
    font-size: 12px;
    color: #1e3a5f;
    line-height: 1.5;
    text-align: center;
}

.fcc-teaser strong {
    font-weight: 700;
}

.fcc-teaser-sub {
    margin-top: 3px;
    font-size: 11px;
    color: #475569;
}

/* ── Progress bar ──────────────────────────────────────────── */
.fcc-progress {
    height: 3px;
    background: #e2e8f0;
}

.fcc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #10b981);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Step dots ─────────────────────────────────────────────── */
.fcc-step-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px 0;
}

.fcc-step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s;
}

.fcc-step-dot.active {
    background: #6366f1;
    width: 20px;
    border-radius: 3px;
}

.fcc-step-dot.done {
    background: #10b981;
}

/* ── Body ──────────────────────────────────────────────────── */
.fcc-body {
    padding: 14px 16px 16px;
    max-height: 400px;
    max-height: min(400px, calc(100dvh - 160px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ── Steps ─────────────────────────────────────────────────── */
.fcc-step {
    display: none;
    animation: fccFadeUp 0.3s ease;
}

.fcc-step.active {
    display: block;
}

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

.fcc-step-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.fcc-step-sub {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 12px;
}

/* ── Choice cards ──────────────────────────────────────────── */
.fcc-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fcc-choice-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

.fcc-choice-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
    background: #fff;
}

.fcc-choice-card:hover {
    border-color: #6366f1;
    background: #eef2ff;
}

.fcc-choice-card.selected {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.fcc-choice-card.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    color: #6366f1;
    font-size: 10px;
    font-weight: 700;
}

.fcc-choice-icon {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.fcc-choice-icon svg {
    width: 22px;
    height: 22px;
    color: #6366f1;
}

.fcc-choice-label {
    font-size: 11px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.fcc-choice-sub {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

/* ── Chips ─────────────────────────────────────────────────── */
.fcc-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fcc-chip {
    border: 2px solid #e2e8f0;
    border-radius: 100px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    transition: all 0.2s;
    white-space: nowrap;
}

.fcc-chip:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.fcc-chip.selected {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
}

/* ── Form ──────────────────────────────────────────────────── */
.fcc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.fcc-form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.fcc-form-grid .fcc-form-group {
    margin-bottom: 0;
}

.fcc-form-group label {
    font-size: 10px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.fcc-form-group input {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 16px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.fcc-form-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.fcc-form-group input.error {
    border-color: #ef4444;
}

.fcc-field-error {
    font-size: 10px;
    color: #ef4444;
}

/* ── Navigation row ────────────────────────────────────────── */
.fcc-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    gap: 8px;
}

.fcc-step-counter {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
}

.fcc-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.fcc-btn-back {
    background: #f1f5f9;
    color: #475569;
}

.fcc-btn-back:hover {
    background: #e2e8f0;
}

.fcc-btn-next {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}

.fcc-btn-next:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.fcc-btn-next:disabled,
.fcc-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fcc-btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    flex: 1;
}

.fcc-btn-submit:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.fcc-btn-submit.loading .fcc-btn-text { display: none; }
.fcc-btn-submit.loading .fcc-spinner  { display: block; }

.fcc-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fccSpin 0.8s linear infinite;
}

@keyframes fccSpin {
    to { transform: rotate(360deg); }
}

/* ── Privacy ───────────────────────────────────────────────── */
.fcc-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 10px;
}

.fcc-privacy svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.fcc-privacy a {
    color: #6366f1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fcc-privacy a:hover {
    color: #4f46e5;
}

/* ── Success screen ────────────────────────────────────────── */
.fcc-success {
    text-align: center;
    padding: 20px 10px;
}

.fcc-success-icon {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcc-success-icon svg {
    width: 48px;
    height: 48px;
    color: #10b981;
}

.fcc-success h4 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.fcc-success p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 6px 0;
}

.fcc-success-sign {
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
    margin-top: 8px !important;
}

/* ── Products screen ───────────────────────────────────────── */
.fcc-products-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.fcc-success-icon-small svg {
    width: 28px;
    height: 28px;
    color: #10b981;
    flex-shrink: 0;
}

.fcc-products-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
}

.fcc-products-sub {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.5;
}

.fcc-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fcc-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.fcc-product-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #f8fafc;
}

.fcc-product-info {
    flex: 1;
    min-width: 0;
}

.fcc-product-name {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fcc-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0A825A;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.fcc-product-btn:hover {
    background: #059669;
    color: #fff;
}

.fcc-product-btn svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 400px) {
    .fcc-chatbox {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 12px;
    }

    .fcc-launcher {
        right: 12px;
        bottom: 12px;
    }

    .fcc-form-grid {
        grid-template-columns: 1fr;
    }

    .fcc-choice-grid.three {
        grid-template-columns: 1fr 1fr;
    }
}