/* ── Widget Kapsayıcı ── */
#akademi-ai-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#akademi-ai-widget,
#akademi-ai-widget *,
#akademi-ai-widget *::before,
#akademi-ai-widget *::after {
    box-sizing: border-box;
}

/* ── Açma Butonu ── */
#akademi-ai-toggle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: linear-gradient(135deg, var(--akademi-ai-color, #0056b3), #003d8f);
    box-shadow: 0 4px 20px rgba(0, 86, 179, 0.45);
    position: relative;
}

#akademi-ai-toggle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--akademi-ai-color, #0056b3);
    opacity: 0.5;
    animation: pulse-ring 2.8s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { transform: scale(1);   opacity: 0.5; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

#akademi-ai-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(0, 86, 179, 0.55);
}

#akademi-ai-toggle svg {
    width: 27px;
    height: 27px;
}

.akademi-ai-owned-cta ~ #akademi-ai-widget #akademi-ai-toggle,
body.akademi-ai-has-hospa-cta #akademi-ai-toggle {
    display: none !important;
}

.akademi-ai-owned-cta ~ #akademi-ai-widget,
body.akademi-ai-has-hospa-cta #akademi-ai-widget {
    left: auto !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: 24px !important;
    transform: none !important;
    pointer-events: none;
}

.akademi-ai-owned-cta ~ #akademi-ai-widget #akademi-ai-chat-container,
body.akademi-ai-has-hospa-cta #akademi-ai-chat-container {
    position: fixed;
    left: auto;
    right: max(16px, env(safe-area-inset-right));
    bottom: 24px;
    transform: none;
    pointer-events: auto;
    animation: slideUp 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.akademi-ai-owned-cta {
    --cta-primary: var(--akademi-ai-color, #0056b3);
    --cta-accent: #3ec4f1;
    --cta-border: #e2e8f0;
    position: fixed !important;
    bottom: 30px !important;
    left: 50vw !important;
    transform: translateX(-50%) !important;
    z-index: 890 !important;
    display: flex !important;
    align-items: center !important;
    width: max-content !important;
    max-width: 92vw !important;
    padding: 6px !important;
    border: 1px solid rgba(0, 74, 141, 0.08) !important;
    border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 15px 35px rgba(0, 74, 141, 0.12) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

body.akademi-ai-chat-open .akademi-ai-owned-cta,
body.akademi-ai-chat-open .hospa-floating-cta {
    display: none !important;
}

.akademi-ai-owned-cta *,
.akademi-ai-owned-cta *::before,
.akademi-ai-owned-cta *::after {
    box-sizing: border-box;
}

.akademi-ai-owned-cta .hospa-cta-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 190px;
    padding: 12px 35px;
    border: none;
    border-radius: 45px;
    background: transparent;
    text-decoration: none !important;
    cursor: pointer;
}

.akademi-ai-owned-cta .hospa-cta-divider {
    width: 1px;
    height: 45px;
    margin: 0 5px;
    background: var(--cta-border);
}

.akademi-ai-owned-cta .hospa-cta-icon {
    width: 28px;
    height: 28px;
    color: var(--cta-accent);
}

.akademi-ai-owned-cta .hospa-cta-text {
    color: var(--cta-primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hospa-floating-cta .akademi-ai-hospa-live-trigger {
    position: relative !important;
    isolation: isolate;
    overflow: hidden;
    min-width: 176px !important;
    padding: 10px 28px !important;
    background: #ffffff !important;
    border: 1px solid rgba(62, 196, 241, 0.42) !important;
    box-shadow: 0 10px 24px rgba(0, 86, 179, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
    transform: translateZ(0);
    animation: akademiCtaLift 2.4s ease-in-out infinite;
    will-change: transform;
}

.hospa-floating-cta .akademi-ai-hospa-live-trigger::before {
    content: '';
    position: absolute;
    inset: 4px;
    z-index: 0;
    border-radius: inherit;
    border: 2px solid rgba(62, 196, 241, 0.55);
    opacity: 0.9;
    pointer-events: none;
    animation: akademiCtaRing 2s ease-out infinite;
}

.hospa-floating-cta .akademi-ai-hospa-live-trigger::after {
    content: '';
    position: absolute;
    top: -45%;
    bottom: -45%;
    left: -35%;
    width: 42%;
    z-index: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(62, 196, 241, 0.2), transparent);
    pointer-events: none;
    transform: translateX(-140%) rotate(18deg);
    animation: akademiCtaSweep 3s ease-in-out infinite;
    will-change: transform;
}

.hospa-floating-cta .akademi-ai-hospa-live-trigger > * {
    position: relative;
    z-index: 2;
}

.hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-icon {
    width: 26px !important;
    height: 26px !important;
    color: var(--akademi-ai-color, #0056b3) !important;
    animation: akademiCtaIconFloat 2.1s ease-in-out infinite;
    will-change: transform;
}

.hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-text {
    color: var(--akademi-ai-color, #0056b3) !important;
    max-width: 150px;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    font-size: 0.78rem !important;
    letter-spacing: 0.4px !important;
}

@keyframes akademiCtaLift {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-2px) translateZ(0); }
}

@keyframes akademiCtaRing {
    0% { opacity: 0.8; transform: scale(0.96); }
    70%, 100% { opacity: 0; transform: scale(1.16); }
}

@keyframes akademiCtaSweep {
    0%, 45% { transform: translateX(-150%) rotate(18deg); }
    75%, 100% { transform: translateX(360%) rotate(18deg); }
}

@keyframes akademiCtaIconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    42% { transform: translateY(-3px) rotate(-5deg); }
    72% { transform: translateY(1px) rotate(4deg); }
}

@keyframes akademiCenterChatIn {
    from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .hospa-floating-cta .akademi-ai-hospa-live-trigger,
    .hospa-floating-cta .akademi-ai-hospa-live-trigger::before,
    .hospa-floating-cta .akademi-ai-hospa-live-trigger::after,
    .hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-icon,
    #akademi-ai-chat-header::after,
    .bot-avatar-wrap::before,
    .bot-avatar-wrap::after,
    .ai-welcome-bubble::before {
        animation: none !important;
    }
}

/* ── Chat Penceresi ── */
#akademi-ai-chat-container {
    display: none;
    position: absolute;
    bottom: 84px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100dvh - 32px);
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 86, 179, 0.08);
    box-shadow: 0 34px 90px rgba(0, 45, 95, 0.18), 0 8px 28px rgba(0, 86, 179, 0.09);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Header ── */
#akademi-ai-chat-header {
    position: relative;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background:
        radial-gradient(circle at 18% 20%, rgba(62, 196, 241, 0.32), transparent 28%),
        linear-gradient(135deg, var(--akademi-ai-color, #0056b3), #003d8f 76%);
    flex-shrink: 0;
    overflow: hidden;
}

#akademi-ai-chat-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 18px, rgba(255,255,255,0.08) 18px 19px, transparent 19px 38px),
        linear-gradient(0deg, transparent 0 18px, rgba(255,255,255,0.07) 18px 19px, transparent 19px 38px);
    background-size: 38px 38px;
    opacity: 0.38;
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
    pointer-events: none;
}

#akademi-ai-chat-header::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -35%;
    width: 55%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
    transform: rotate(18deg);
    animation: akademiHeaderScan 4.6s ease-in-out infinite;
    pointer-events: none;
}

.bot-info {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bot-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(62, 196, 241, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22), 0 0 22px rgba(62, 196, 241, 0.28);
}

.bot-avatar-wrap::before,
.bot-avatar-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.bot-avatar-wrap::before {
    inset: -5px;
    border: 1px solid rgba(62, 196, 241, 0.5);
    animation: akademiAiHalo 2.4s ease-out infinite;
}

.bot-avatar-wrap::after {
    right: 5px;
    bottom: 7px;
    width: 8px;
    height: 8px;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.95);
    animation: akademiAiDot 1.5s ease-in-out infinite;
}

.bot-avatar-core {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--akademi-ai-color, #0056b3);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.bot-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bot-name {
    font-weight: 700;
    font-size: 15.5px;
    color: white;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.bot-status {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
    display: flex;
    align-items: center;
    gap: 5px;
}

.bot-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
}

.bot-ai-chip {
    position: relative;
    z-index: 1;
    margin-left: auto;
    padding: 5px 9px;
    border: 1px solid rgba(255,255,255,0.26);
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.92);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
}

#akademi-ai-close {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.25s;
    flex-shrink: 0;
}

#akademi-ai-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* ── Chat Gövdesi ── */
#akademi-ai-chat-body {
    position: relative;
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 10%, rgba(62, 196, 241, 0.1), transparent 28%),
        radial-gradient(circle at 88% 78%, rgba(0, 86, 179, 0.08), transparent 34%),
        linear-gradient(180deg, #f6f9fd, #f1f5f9);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

#akademi-ai-chat-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 86, 179, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 86, 179, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, #000, transparent 75%);
    pointer-events: none;
}

#akademi-ai-chat-body::-webkit-scrollbar { width: 5px; }
#akademi-ai-chat-body::-webkit-scrollbar-track { background: transparent; }
#akademi-ai-chat-body::-webkit-scrollbar-thumb {
    background: #cdd2da;
    border-radius: 10px;
}

/* ── Mesaj Balonları ── */
.ai-bubble, .user-bubble {
    max-width: 85%;
    padding: 13px 18px;
    border-radius: 20px;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.6;
    animation: msgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-bubble {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(228, 232, 239, 0.8);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    color: #334155;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ai-welcome-bubble {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: 88%;
    border-color: rgba(62, 196, 241, 0.2);
    box-shadow: 0 10px 26px rgba(0, 86, 179, 0.08);
}

.ai-welcome-bubble::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ec4f1;
    box-shadow: 0 0 0 5px rgba(62, 196, 241, 0.12), 0 0 16px rgba(62, 196, 241, 0.55);
    animation: akademiAiDot 1.8s ease-in-out infinite;
}

.ai-bubble-kicker {
    color: var(--akademi-ai-color, #0056b3);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.ai-bubble-main {
    display: block;
}

.ai-suggestion-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.ai-suggestion-row span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0, 86, 179, 0.06);
    color: #0f4d88;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.ai-structured-answer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-structured-title {
    color: #0f4d88;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.ai-structured-answer p {
    margin: 0;
    color: #475569;
}

.ai-polyclinic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.ai-list-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid rgba(0, 86, 179, 0.1);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.ai-list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(62, 196, 241, 0.16);
    color: var(--akademi-ai-color, #0056b3);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.ai-list-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ai-list-content strong {
    color: #1f2937;
    font-size: 13.5px;
    line-height: 1.35;
}

.ai-list-content small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.user-bubble {
    background: linear-gradient(135deg, var(--akademi-ai-color, #0056b3), #00449e);
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.25), 0 2px 6px rgba(0, 86, 179, 0.15);
    margin-left: auto;
}

/* ── Yazıyor Animasyonu ── */
.thinking-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(62, 196, 241, 0.22);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.07);
    animation: msgIn 0.25s ease forwards;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: dotBounce 1.4s ease-in-out infinite;
}

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

@keyframes dotBounce {
    0%, 60%, 100% { transform: translateY(0);    background: #94a3b8; }
    30%            { transform: translateY(-7px); background: var(--akademi-ai-color, #0056b3); }
}

@keyframes akademiHeaderScan {
    0%, 45% { transform: translateX(0) rotate(18deg); opacity: 0; }
    55% { opacity: 1; }
    100% { transform: translateX(320%) rotate(18deg); opacity: 0; }
}

@keyframes akademiAiHalo {
    0% { opacity: 0.65; transform: scale(0.86); }
    80%, 100% { opacity: 0; transform: scale(1.32); }
}

@keyframes akademiAiDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.72); opacity: 0.72; }
}

/* ── Disclaimer ── */
.chat-disclaimer {
    text-align: center;
    font-size: 10.5px;
    color: #9ca3af;
    padding: 6px 16px 8px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    line-height: 1.4;
    flex-shrink: 0;
}

/* ── Input Alanı ── */
#akademi-ai-chat-input {
    display: flex;
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #e8ecf0;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

#akademi-ai-user-input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid #e4e8ef;
    background: #f7f9fc;
    border-radius: 24px;
    padding: 10px 16px;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#akademi-ai-user-input::placeholder { color: #9ca3af; }

#akademi-ai-user-input:focus {
    border-color: var(--akademi-ai-color, #0056b3);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

#akademi-ai-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--akademi-ai-color, #0056b3), #003d8f);
    box-shadow: 0 2px 10px rgba(0, 86, 179, 0.35);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}

#akademi-ai-send:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 86, 179, 0.45);
}

#akademi-ai-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#akademi-ai-send svg {
    width: 17px;
    height: 17px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Mikrofon Butonu ── */
#akademi-ai-mic-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e4e8ef;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

#akademi-ai-mic-btn:hover:not(:disabled) {
    background: #f7f9fc;
    border-color: #d1d5db;
}

#akademi-ai-mic-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#akademi-ai-mic-btn svg {
    width: 18px;
    height: 18px;
    stroke: #6b7280;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}

#akademi-ai-mic-btn.recording {
    background: #fee2e2;
    border-color: #fca5a5;
    animation: micPulse 1.5s infinite;
}

#akademi-ai-mic-btn.recording svg {
    stroke: #ef4444;
}

@keyframes micPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ── Aksiyon Butonları ── */
.randevu-btn,
.acil-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 11px 16px;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13.5px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.randevu-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(22, 163, 74, 0.35);
}

.randevu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
    color: #ffffff !important;
    text-decoration: none !important;
}

.acil-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(220, 38, 38, 0.4);
    animation: acilPulse 1.8s ease-in-out infinite;
}

.acil-btn:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

@keyframes acilPulse {
    0%, 100% { box-shadow: 0 3px 12px rgba(220, 38, 38, 0.4); }
    50%       { box-shadow: 0 3px 22px rgba(220, 38, 38, 0.7); }
}

.acil-mesaj {
    color: #b91c1c;
    font-weight: 600;
    background: #fef2f2;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #dc2626;
}

/* ── Tablet / Mobil Uyum ── */
@media (max-width: 768px) {
    body .akademi-ai-owned-cta.hospa-floating-cta {
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        width: calc(100vw - 24px) !important;
        max-width: 430px !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 64px !important;
        max-height: 72px !important;
        padding: 6px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-radius: 24px !important;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta .hospa-cta-btn {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        padding: 8px 8px !important;
        gap: 6px !important;
        flex-direction: row !important;
        border-radius: 18px !important;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta .hospa-cta-divider {
        height: 34px !important;
        margin: 0 4px !important;
        flex: 0 0 1px !important;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta .hospa-cta-icon {
        width: 21px !important;
        height: 21px !important;
        flex: 0 0 21px !important;
        margin: 0 !important;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta .hospa-cta-text {
        max-width: 100% !important;
        font-size: 0.64rem !important;
        letter-spacing: 0 !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        text-align: left !important;
    }

    .hospa-floating-cta .akademi-ai-hospa-live-trigger {
        min-width: 0 !important;
        padding: 8px 8px !important;
        flex-direction: row !important;
    }

    .hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-icon {
        width: 23px !important;
        height: 23px !important;
    }

    .hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-text {
        max-width: 100% !important;
        font-size: 0.68rem !important;
        letter-spacing: 0.15px !important;
        white-space: nowrap !important;
    }

    .akademi-ai-owned-cta ~ #akademi-ai-widget,
    body.akademi-ai-has-hospa-cta #akademi-ai-widget {
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        right: 0 !important;
        width: 100vw;
    }

    .akademi-ai-owned-cta ~ #akademi-ai-widget #akademi-ai-chat-container,
    body.akademi-ai-has-hospa-cta #akademi-ai-chat-container {
        left: 10px !important;
        right: 10px !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        width: auto !important;
        height: min(68dvh, 560px) !important;
        max-height: calc(100dvh - 138px) !important;
        transform: none !important;
        border-radius: 18px;
    }

    #akademi-ai-chat-header {
        padding: 13px 14px;
    }

    .bot-avatar-wrap {
        width: 42px;
        height: 42px;
    }

    .bot-avatar-core {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .bot-name {
        font-size: 14px;
    }

    .bot-status {
        font-size: 10.5px;
    }

    .bot-ai-chip {
        display: none;
    }

    .ai-welcome-bubble {
        max-width: 92%;
    }

    .ai-suggestion-row {
        gap: 5px;
    }

    .ai-suggestion-row span {
        font-size: 10px;
        padding: 5px 7px;
    }
}

@media (max-width: 440px) {
    #akademi-ai-widget {
        bottom: 14px;
        right: 14px;
    }

    #akademi-ai-chat-container {
        width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
        height: 72vh;
        right: -14px;
        bottom: 76px;
        border-radius: 18px;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta {
        width: calc(100vw - 16px) !important;
        min-height: 60px !important;
        max-height: 68px !important;
        padding: 5px !important;
        border-radius: 22px !important;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta .hospa-cta-btn {
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        padding: 7px 5px !important;
        gap: 5px !important;
    }

    body .akademi-ai-owned-cta.hospa-floating-cta .hospa-cta-text,
    .hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-text {
        font-size: 0.58rem !important;
        letter-spacing: 0 !important;
    }

    body.akademi-ai-has-hospa-cta #akademi-ai-chat-container {
        left: 8px !important;
        right: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        width: auto !important;
        height: min(68dvh, 520px) !important;
        max-height: calc(100dvh - 138px) !important;
        transform: none !important;
    }

    .akademi-ai-owned-cta ~ #akademi-ai-widget #akademi-ai-chat-container {
        left: 8px !important;
        right: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        width: auto !important;
        height: min(68dvh, 520px) !important;
        max-height: calc(100dvh - 138px) !important;
        transform: none !important;
    }

    #akademi-ai-chat-body {
        padding: 12px;
    }

    .ai-bubble,
    .user-bubble {
        max-width: 92%;
        font-size: 13.5px;
        padding: 12px 14px;
    }

    .ai-welcome-bubble {
        max-width: 94%;
        gap: 8px;
    }

    .ai-bubble-kicker {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 360px) {
    .akademi-ai-owned-cta .hospa-cta-text,
    .hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-text {
        font-size: 0.56rem !important;
    }

    .akademi-ai-owned-cta .hospa-cta-icon,
    .hospa-floating-cta .akademi-ai-hospa-live-trigger .hospa-cta-icon {
        width: 21px !important;
        height: 21px !important;
    }
}

/* =========================================================
   V8 — Sağlık yönlendirme sonuçları
========================================================= */
.ai-triage-card {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #dfe8f1;
    background: #f8fbfe;
    color: #23364a;
}

.ai-triage-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.ai-triage-head > div { min-width: 0; }

.ai-triage-head strong {
    display: block;
    margin-bottom: 4px;
    color: #17324d;
    font-size: 0.9rem;
    line-height: 1.3;
}

.ai-triage-head p,
.ai-triage-neutral p {
    margin: 0;
    color: #61758a;
    font-size: 0.82rem;
    line-height: 1.55;
}

.ai-triage-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e7f3ff;
    color: #0066cc;
    font-size: 0.92rem;
    font-weight: 900;
}

.ai-triage-critical {
    background: linear-gradient(145deg, #fff4f4, #fffafa);
    border-color: #ffbcbc;
}
.ai-triage-critical .ai-triage-icon { background: #ffe0e0; color: #d80000; }
.ai-triage-critical .ai-triage-head strong { color: #b80000; }

.ai-triage-emergency {
    background: linear-gradient(145deg, #fff8ee, #fffdf9);
    border-color: #ffd59d;
}
.ai-triage-emergency .ai-triage-icon { background: #ffe9c9; color: #c76c00; }
.ai-triage-emergency .ai-triage-head strong { color: #995000; }

.ai-triage-priority {
    background: linear-gradient(145deg, #fffbea, #fffef8);
    border-color: #f1df8e;
}
.ai-triage-priority .ai-triage-icon { background: #fff1b5; color: #897000; }
.ai-triage-priority .ai-triage-head strong { color: #6f5a00; }

.ai-triage-routine,
.ai-triage-followup {
    background: linear-gradient(145deg, #f2f9ff, #fbfdff);
    border-color: #cfe5f7;
}

.ai-related-unit-title {
    margin: 13px 0 7px;
    color: #36546f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.ai-unit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 7px;
}

.ai-unit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(213, 226, 238, 0.95);
    border-radius: 11px;
    background: rgba(255,255,255,0.88);
    color: #223c55;
    font-size: 0.79rem;
    font-weight: 720;
}

.ai-unit-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #e8f4ff;
    color: #0066cc;
    font-size: 0.8rem;
    font-weight: 900;
}

.ai-followup-list {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #304c66;
    font-size: 0.8rem;
    line-height: 1.55;
}

.ai-followup-list li + li { margin-top: 5px; }

.ai-triage-action {
    display: flex;
    width: 100%;
    min-height: 40px;
    margin-top: 12px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 0;
    border-radius: 11px;
    text-decoration: none !important;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.ai-triage-action-critical { background: #e00000; color: #fff !important; }
.ai-triage-action-emergency { background: #e77a00; color: #fff; }
.ai-triage-action-appointment {
    background: linear-gradient(135deg, var(--akademi-ai-color, #0056b3), #0879df);
    color: #fff !important;
}

.ai-triage-note {
    margin-top: 9px;
    padding: 8px 9px;
    border-radius: 9px;
    background: rgba(255,255,255,0.68);
    border: 1px solid rgba(0,0,0,0.05);
    color: #7b8793;
    font-size: 0.68rem;
    line-height: 1.45;
}

#akademi-ai-send[aria-busy="true"] {
    opacity: 0.62;
    cursor: wait;
}

@media (max-width: 520px) {
    .ai-triage-card { padding: 12px; }
    .ai-triage-head { gap: 9px; }
    .ai-triage-icon { width: 30px; height: 30px; flex-basis: 30px; }
}
