/* ========================================
   AI Chatbot Widget — Online Psikolog
   Modern ChatGPT-inspired Design
   ======================================== */

/* ── Overlay — Glassmorphism backdrop ──── */
.chatbot-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s;
}
.chatbot-overlay.chatbot-visible {
    opacity: 1;
    visibility: visible;
}

/* ── Popup Container ───────────────────── */
.chatbot-popup {
    width: 100%;
    max-width: 460px;
    height: 85vh;
    max-height: 680px;
    background: #ffffff;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 24px 56px -8px rgba(0, 0, 0, 0.22),
        0 0 80px rgba(103, 143, 255, 0.06);
    transform: scale(0.96) translateY(16px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chatbot-overlay.chatbot-visible .chatbot-popup {
    transform: scale(1) translateY(0);
}

/* ── Header ────────────────────────────── */
.chatbot-header {
    background: linear-gradient(135deg, #678fff 0%, #4f6ef7 60%, #5a7ef7 100%);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.chatbot-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
    pointer-events: none;
}
.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.chatbot-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.chatbot-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 13px;
    height: 13px;
    background: #00d182;
    border-radius: 50%;
    border: 2.5px solid #5a7ef7;
    animation: chatbot-statusPulse 2.5s infinite;
}
.chatbot-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chatbot-header-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}
.chatbot-header-status {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}
.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.chatbot-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ── Messages Area ─────────────────────── */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: linear-gradient(180deg, #f8f9fb 0%, #f3f4f6 100%);
}
.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}

/* ── Message Bubbles ───────────────────── */
.chatbot-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: chatbot-msgSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chatbot-msg-bot {
    justify-content: flex-start;
}
.chatbot-msg-user {
    justify-content: flex-end;
}
.chatbot-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #678fff, #5a7ef7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(103, 143, 255, 0.25);
}
.chatbot-msg-avatar svg {
    width: 14px;
    height: 14px;
}
.chatbot-msg-bubble {
    max-width: 80%;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}
.chatbot-msg-bot .chatbot-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border-radius: 18px 18px 18px 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.chatbot-msg-user .chatbot-msg-bubble {
    background: linear-gradient(135deg, #678fff, #5a7ef7);
    color: #ffffff;
    border-radius: 18px 18px 6px 18px;
    box-shadow: 0 2px 10px rgba(103, 143, 255, 0.3);
}

/* ── Quick Action Buttons ──────────────── */
.chatbot-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.chatbot-quick-btn {
    padding: 9px 16px;
    border: 1.5px solid rgba(103, 143, 255, 0.3);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    color: #678fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.chatbot-quick-btn:hover {
    background: #678fff;
    color: #ffffff;
    border-color: #678fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(103, 143, 255, 0.3);
}
.chatbot-quick-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Input Area ────────────────────────── */
.chatbot-input-area {
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    background: #ffffff;
}
.chatbot-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f5f7;
    border: 1.5px solid transparent;
    border-radius: 16px;
    padding: 4px 6px 4px 4px;
    transition: all 0.25s ease;
}
.chatbot-input-wrapper:focus-within {
    border-color: rgba(103, 143, 255, 0.45);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(103, 143, 255, 0.08);
}
.chatbot-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #1e293b;
}
.chatbot-input::placeholder {
    color: #9ca3af;
}
.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #678fff, #5a7ef7);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.chatbot-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(103, 143, 255, 0.4);
}
.chatbot-send-btn:active {
    transform: scale(0.95);
}
.chatbot-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Mini Button (bottom-right) ────────── */
.chatbot-mini-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999998;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, #678fff, #4f6ef7);
    color: #ffffff;
    cursor: pointer;
    box-shadow:
        0 4px 16px rgba(103, 143, 255, 0.35),
        0 0 0 0 rgba(103, 143, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: chatbot-btnAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chatbot-mini-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 28px rgba(103, 143, 255, 0.5);
    border-radius: 18px;
}
.chatbot-mini-btn:active {
    transform: scale(0.95);
}
.chatbot-mini-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    border: 2px solid rgba(103, 143, 255, 0.4);
    animation: chatbot-ringPulse 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

/* ── Typing Indicator ──────────────────── */
.chatbot-typing-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-typing {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 18px 18px 18px 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    width: fit-content;
}
.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b0bccd;
    animation: chatbot-bounce 1.4s infinite;
}
.chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}
.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

/* ── Status Message ────────────────────── */
.chatbot-status {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #8a94a6;
    text-align: center;
    padding: 6px 0;
    font-style: italic;
    animation: chatbot-fadeIn 0.2s ease;
}

/* ── Expert Card (Homepage-inspired) ──── */
.chatbot-expert-card {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    padding: 16px;
    margin: 2px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-expert-card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}
.chatbot-expert-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.chatbot-expert-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff, #e0e8ff);
    color: #6690ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #6690ff;
    position: relative;
}
.chatbot-expert-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.chatbot-expert-card-info {
    flex: 1;
    min-width: 0;
}
.chatbot-expert-card-name {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #353a3e;
    margin-bottom: 2px;
}
.chatbot-expert-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #5a5a5a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.chatbot-expert-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #5a5a5a;
}
.chatbot-expert-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.chatbot-expert-card-meta .chatbot-star {
    color: #ffc107;
}
.chatbot-expert-card-meta .chatbot-exp-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}
.chatbot-expert-card-divider {
    width: 100%;
    height: 1px;
    background: #e9e9e9;
    margin: 4px 0 10px;
}
.chatbot-expert-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.chatbot-expert-card-price-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.chatbot-expert-card-price {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #353a3e;
}
.chatbot-expert-card-price small {
    font-size: 12px;
    font-weight: 400;
    color: #5a5a5a;
}
.chatbot-free-cons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(6, 208, 131, 0.08);
    color: #06d083;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
}
.chatbot-free-cons-btn {
    cursor: pointer;
    border: 1px solid #06d083;
    transition: all 0.2s ease;
}
.chatbot-free-cons-btn:hover {
    background: #06d083;
    color: #fff;
}

/* ── Pre-interview availability ────────── */
.chatbot-pre-interview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chatbot-pre-interview-badge {
    background: #06d083;
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}
.chatbot-pre-interview-duration {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
}
.chatbot-pre-interview-slot {
    border-color: #06d083 !important;
    color: #06d083 !important;
}
.chatbot-pre-interview-slot:hover {
    background: rgba(6, 208, 131, 0.15) !important;
}
.chatbot-pre-interview-slot.chatbot-slot-selected {
    background: #06d083 !important;
    color: #fff !important;
    border-color: #06d083 !important;
}
.chatbot-pre-interview-type {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.chatbot-pre-interview-type-label {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
}
.chatbot-pre-interview-type-btns {
    display: flex;
    gap: 6px;
}
.chatbot-type-btn {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chatbot-type-btn-active {
    background: #06d083;
    color: #fff;
    border-color: #06d083;
}
.chatbot-expert-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.chatbot-expert-card-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.chatbot-expert-card-btn-primary {
    background: #6690ff;
    color: #ffffff;
}
.chatbot-expert-card-btn-primary:hover {
    background: #5a80f0;
    box-shadow: 0 3px 12px rgba(102, 144, 255, 0.3);
    color: #ffffff;
}
.chatbot-expert-card-btn-outline {
    background: transparent;
    border: 1.5px solid #6690ff;
    color: #6690ff;
}
.chatbot-expert-card-btn-outline:hover {
    background: rgba(102, 144, 255, 0.06);
}

/* ── "En Uygun" Best Match Badge ─────── */
.chatbot-best-match-badge {
    position: absolute;
    top: -1px;
    left: 12px;
    background: linear-gradient(135deg, #00d182, #00b870);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 209, 130, 0.3);
    z-index: 1;
    letter-spacing: 0.02em;
}

/* ── Expert Follow-up Buttons ────────── */
.chatbot-expert-followup {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 2px;
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-followup-btn {
    padding: 9px 16px;
    border: 1.5px solid rgba(103, 143, 255, 0.3);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    color: #678fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.chatbot-followup-btn:hover {
    background: #678fff;
    color: #ffffff;
    border-color: #678fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(103, 143, 255, 0.3);
}
.chatbot-followup-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Availability Grid ─────────────────── */
.chatbot-availability {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 2px 0;
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-availability-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.chatbot-availability-day {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.chatbot-availability-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chatbot-availability-slot {
    padding: 7px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid rgba(103, 143, 255, 0.2);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #678fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.chatbot-availability-slot:hover {
    border-color: #678fff;
    background: rgba(103, 143, 255, 0.04);
    transform: translateY(-1px);
}
.chatbot-availability-slot.chatbot-slot-selected {
    background: linear-gradient(135deg, #678fff, #5a7ef7);
    color: #ffffff;
    border-color: #678fff;
    box-shadow: 0 2px 8px rgba(103, 143, 255, 0.3);
}
.chatbot-slot-more {
    cursor: pointer;
    background: #f4f5f7;
    border-color: rgba(103, 143, 255, 0.2);
    color: #678fff;
    font-weight: 600;
}
.chatbot-slot-more:hover {
    background: rgba(103, 143, 255, 0.08);
    border-color: #678fff;
    transform: translateY(-1px);
}

/* ── Login Form ────────────────────────── */
.chatbot-login-container {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 18px;
    margin: 2px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-login-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}
.chatbot-login-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.5;
}
.chatbot-phone-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.chatbot-country-code {
    width: 80px;
    padding: 10px 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: #f9fafb;
    color: #1e293b;
    outline: none;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.chatbot-country-code:focus {
    border-color: #678fff;
}
.chatbot-phone-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: #f9fafb;
    outline: none;
    transition: all 0.2s;
}
.chatbot-phone-input:focus {
    border-color: #678fff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(103, 143, 255, 0.08);
}
.chatbot-agreements {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
}
.chatbot-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    color: #4a5568;
    line-height: 1.4;
    cursor: pointer;
}
.chatbot-agreement-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #678fff;
}
.chatbot-agreement-label a {
    color: #678fff;
    text-decoration: underline;
}
.chatbot-login-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #678fff, #5a7ef7);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(103, 143, 255, 0.25);
}
.chatbot-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(103, 143, 255, 0.35);
}
.chatbot-login-btn:disabled {
    background: #c7d2fe;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.chatbot-login-link {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border: none;
    background: none;
    color: #678fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}
.chatbot-login-link:hover {
    color: #5a7ef7;
    text-decoration: underline;
}
.chatbot-login-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    line-height: 1.4;
}
.chatbot-code-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}
.chatbot-code-input {
    width: 50px;
    height: 56px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: #1e293b;
    background: #f9fafb;
    outline: none;
    transition: all 0.2s;
}
.chatbot-code-input:focus {
    border-color: #678fff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(103, 143, 255, 0.1);
}

/* ── Reviews ──────────────────────────── */
.chatbot-reviews-container {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    padding: 16px;
    margin: 2px 0;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.06);
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.chatbot-reviews-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chatbot-reviews-score {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}
.chatbot-reviews-stars {
    display: flex;
    gap: 2px;
    font-size: 16px;
}
.chatbot-star-filled {
    color: #ffc107;
}
.chatbot-star-empty {
    color: #e0e0e0;
}
.chatbot-reviews-count {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #8a94a6;
    font-weight: 500;
}
.chatbot-reviews-text {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
}
.chatbot-reviews-quote {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #5a5a5a;
    font-style: italic;
    line-height: 1.5;
    padding: 10px 14px;
    background: #f8f9fb;
    border-radius: 10px;
    border-left: 3px solid #6690ff;
    margin-bottom: 10px;
    position: relative;
}
.chatbot-reviews-quote-icon {
    font-size: 22px;
    color: #6690ff;
    font-style: normal;
    line-height: 1;
    margin-right: 2px;
}
.chatbot-reviews-link {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #6690ff;
    text-decoration: none;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.chatbot-reviews-link:hover {
    background: rgba(102, 144, 255, 0.06);
    color: #5a80f0;
    line-height: 1.5;
}

/* ── Booking CTA ───────────────────────── */
.chatbot-booking-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #00d182, #00b870);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin: 4px 0;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 209, 130, 0.25);
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-booking-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 209, 130, 0.35);
    color: #ffffff;
}

/* ── Session Cards ────────────────────── */
.chatbot-sessions-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 2px 0;
    animation: chatbot-msgSlideIn 0.3s ease;
}
.chatbot-session-card {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s ease;
}
.chatbot-session-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.chatbot-session-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.chatbot-session-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff, #e0e8ff);
    color: #6690ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #6690ff;
    overflow: hidden;
}
.chatbot-session-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.chatbot-session-info {
    flex: 1;
    min-width: 0;
}
.chatbot-session-expert-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.chatbot-session-meta {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #64748b;
}
.chatbot-session-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fb;
    border-radius: 10px;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #1e293b;
}
.chatbot-session-day {
    font-weight: 600;
    text-transform: capitalize;
}
.chatbot-session-date {
    color: #64748b;
}
.chatbot-session-time {
    font-weight: 600;
    color: #678fff;
    margin-left: auto;
}
.chatbot-session-app-note {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: #4a5568;
    margin-top: 8px;
}
.chatbot-session-app-links {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.chatbot-app-store-btn,
.chatbot-play-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
}
.chatbot-app-store-btn {
    background: #e2e3e7;
    color: #1a1a1a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.chatbot-app-store-btn:hover {
    transform: translateY(-1px);
    background: #d5d6db;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}
.chatbot-play-store-btn {
    background: linear-gradient(135deg, #fcc56b, #f5b44a);
    color: #4a3000;
    box-shadow: 0 2px 8px rgba(252, 197, 107, 0.25);
}
.chatbot-play-store-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(252, 197, 107, 0.35);
    color: #4a3000;
}

/* ── Animations ────────────────────────── */
@keyframes chatbot-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes chatbot-msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes chatbot-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}
@keyframes chatbot-statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes chatbot-btnAppear {
    from {
        opacity: 0;
        transform: scale(0.6) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@keyframes chatbot-ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* ── Mobile: Full-screen ───────────────── */
@media (max-width: 576px) {
    .chatbot-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        /* Skip desktop scale animation; use opacity so JS can freely set height for keyboard */
        transform: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    @supports (height: 100dvh) {
        .chatbot-popup {
            height: 100dvh;
            max-height: 100dvh;
        }
    }
    .chatbot-overlay {
        align-items: flex-start;
        overflow: hidden;
    }
    .chatbot-overlay.chatbot-visible .chatbot-popup {
        transform: none;
        opacity: 1;
    }
    .chatbot-header {
        padding-top: calc(max(18px, env(safe-area-inset-top)) + 20px);
    }
    .chatbot-close-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border: 1.5px solid rgba(255, 255, 255, 0.4);
    }
    .chatbot-close-btn svg {
        width: 20px;
        height: 20px;
    }
    .chatbot-input-area {
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }
    .chatbot-mini-btn {
        bottom: 80px;
        right: 16px;
    }
    /* Prevent iOS auto-zoom on input focus (requires font-size >= 16px) */
    .chatbot-input,
    .chatbot-phone-input,
    .chatbot-country-code,
    .chatbot-code-input {
        font-size: 16px;
        touch-action: manipulation;
    }
    /* Ensure input area never hides behind keyboard */
    .chatbot-input-area {
        flex-shrink: 0;
        position: relative;
        z-index: 2;
    }
}
