.finder-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    color: #14BEF0;
    border: 1.5px solid #14BEF0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    letter-spacing: 0.1px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.finder-ai-btn:hover {
    background: #14BEF0;
    color: #fff;
}

.finder-ai-btn .fai-sparkle {
    font-size: 14px;
    line-height: 1;
}

.mcb-search-outer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcb-search-outer .mcb-search-row {
    flex: 1;
    min-width: 0;
}

.mcb-search-outer .finder-ai-btn {
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 8px 12px;
}

.inline-search-box .finder-ai-btn {
    margin-left: 8px;
    flex-shrink: 0;
}

.fai-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: none;
    flex-direction: column;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fai-overlay.fai-open {
    display: flex;
}

@media (min-width: 768px) {
    .fai-overlay {
        top: auto;
        left: auto;
        right: 20px;
        bottom: 20px;
        width: 390px;
        height: 620px;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
        border: 1px solid #e8e8e8;
    }
}

.fai-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    gap: 10px;
}

@media (min-width: 768px) {
    .fai-header {
        border-radius: 16px 16px 0 0;
    }
}

.fai-close {
    background: none;
    border: none;
    color: #414146;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.fai-close:hover {
    color: #000;
}

.fai-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14BEF0, #0DA8D8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fai-header-avatar i {
    color: #fff;
    font-size: 16px;
}

.fai-header-info {
    flex: 1;
    min-width: 0;
}

.fai-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #414146;
    line-height: 1.2;
}

.fai-header-subtitle {
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fai-header-subtitle::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28a745;
    display: inline-block;
}

.fai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
}

.fai-msg {
    max-width: 82%;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
    color: #414146;
}

.fai-msg-ai {
    align-self: flex-start;
    background: #f0f0f5;
    border-radius: 0 16px 16px 16px;
}

.fai-msg-user {
    align-self: flex-end;
    background: #E3F6FD;
    color: #414146;
    border-radius: 16px 0 16px 16px;
}

.fai-chips {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 6px;
    align-self: flex-end;
    align-items: flex-end;
}

.fai-chip {
    display: inline-block;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid #14BEF0;
    border-radius: 20px;
    font-size: 13px;
    color: #14BEF0;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.3;
    text-align: right;
}

.fai-chip:hover {
    background: #14BEF0;
    color: #fff;
}

.fai-doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 92%;
    align-self: flex-start;
}

.fai-doc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.fai-doc-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.fai-doc-card-top {
    display: flex;
    gap: 10px;
    padding: 12px 12px 8px;
}

.fai-doc-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f5;
    border: 2px solid #f0f0f5;
}

.fai-doc-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b5;
    font-size: 18px;
    background: #f0f0f5;
}

.fai-doc-info {
    flex: 1;
    min-width: 0;
}

.fai-doc-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #414146;
    line-height: 1.3;
}

.fai-doc-spec {
    font-size: 12px;
    color: #787887;
    font-weight: 400;
    margin-top: 1px;
}

.fai-doc-qual {
    font-size: 11px;
    color: #a0a0a5;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fai-doc-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 12px 8px;
    font-size: 11.5px;
    color: #787887;
}

.fai-doc-details i {
    margin-right: 3px;
    font-size: 10px;
    color: #b0b0b5;
}

.fai-doc-exp, .fai-doc-clinic, .fai-doc-fee {
    display: flex;
    align-items: center;
}

.fai-doc-cta {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: #f8f8f8;
    color: #14BEF0;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.fai-doc-cta:hover {
    background: #E3F6FD;
    color: #14BEF0;
    text-decoration: none;
}

.fai-doc-cta i {
    margin-left: 4px;
    font-size: 11px;
}

.fai-see-all-btn {
    display: block;
    width: 100%;
    max-width: 92%;
    text-align: center;
    padding: 12px 20px;
    background: #14BEF0;
    color: #fff;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.2s;
    align-self: flex-start;
}

.fai-see-all-btn:hover {
    background: #0DA8D8;
    color: #fff;
    text-decoration: none;
}

.fai-see-all-btn i {
    margin-left: 4px;
    font-size: 12px;
}

.fai-change-city {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 12px;
    color: #787887;
    cursor: pointer;
    transition: color 0.2s;
    align-self: flex-start;
}

.fai-change-city i {
    font-size: 11px;
    color: #14BEF0;
}

.fai-change-city span {
    color: #14BEF0;
    font-weight: 500;
}

.fai-change-city:hover span {
    text-decoration: underline;
}


.fai-result-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 14px;
    margin-top: 4px;
    max-width: 85%;
    align-self: flex-start;
}

.fai-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #414146;
    margin-bottom: 4px;
}

.fai-result-subtitle {
    font-size: 12.5px;
    color: #787887;
    margin-bottom: 10px;
}

.fai-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 20px;
    background: #14BEF0;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.fai-result-btn:hover {
    background: #0DA8D8;
    color: #fff;
    text-decoration: none;
}

.fai-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f0f0f5;
    border-radius: 0 16px 16px 16px;
}

.fai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b0b0b5;
    animation: faiDotPulse 1.4s infinite;
}

.fai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.fai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes faiDotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.fai-city-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    align-self: flex-start;
}

.fai-city-chip {
    display: inline-block;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    font-size: 12.5px;
    color: #414146;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.3;
}

.fai-city-chip:hover {
    background: #14BEF0;
    color: #fff;
    border-color: #14BEF0;
}

.fai-footer {
    flex-shrink: 0;
    border-top: 1px solid #f0f0f0;
    background: #fff;
}

@media (min-width: 768px) {
    .fai-footer {
        border-radius: 0 0 16px 16px;
    }
}

.fai-disclaimer {
    font-size: 11px;
    color: #8e8e93;
    text-align: center;
    padding: 4px 16px 8px;
    line-height: 1.3;
}

.fai-input-row {
    display: flex;
    align-items: center;
    padding: 8px 12px 10px;
    gap: 8px;
}

.fai-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    min-width: 0;
    color: #414146;
    font-family: inherit;
}

.fai-input::placeholder {
    color: #b0b0b5;
}

.fai-input:focus {
    border-color: #14BEF0;
}

.fai-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #14BEF0;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    font-size: 14px;
}

.fai-send:hover {
    background: #0DA8D8;
}

.fai-send:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}

.fai-emergency-card {
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 14px;
    margin-top: 4px;
    max-width: 85%;
    align-self: flex-start;
}

.fai-emergency-card .fai-result-title {
    color: #dc2626;
}
