/* =========================================================
   COMPOSER
   ========================================================= */

.composer-wrap {
    position: absolute;
    z-index: 20;

    bottom: 17px;
    left: 50%;

    width: min(840px,calc(100% - 40px));

    transform: translateX(-50%);
}

.composer {
    height: 62px;

    display: flex;
    align-items: center;

    padding: 6px 7px 6px 21px;

    border: 1px solid rgba(63,103,113,.22);
    border-radius: var(--radius-pill);

    background: rgba(255,255,255,.74);

    box-shadow:
        0 25px 65px rgba(7,21,29,.11),
        0 0 0 1px rgba(255,255,255,.6) inset;

    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);

    transition:
        border-color .25s ease,
        box-shadow .25s ease;
}

.composer:hover {
    border-color: rgba(7,148,163,.25);
}

.composer:focus-within {
    border-color: rgba(34,201,211,.58);

    box-shadow:
        0 0 0 5px rgba(34,201,211,.08),
        0 25px 65px rgba(7,21,29,.13);
}

.composer input {
    min-width: 0;
    flex: 1;

    height: 100%;

    padding-right: 10px;

    border: 0;
    outline: 0;

    background: transparent;
    color: var(--ink);

    font-size: 13px;
}

.composer input::placeholder {
    color: var(--muted-light);
}

.send-btn {
    position: relative;

    width: 49px;
    height: 49px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: #fff;

    background: linear-gradient(
        135deg,
        var(--accent-light),
        var(--accent-dark)
    );

    box-shadow: var(--shadow-accent);

    overflow: hidden;

    transition:
        transform .25s var(--ease-spring),
        box-shadow .25s ease;
}

.send-btn::before {
    content: "";

    position: absolute;
    inset: -50%;

    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,.38),
        transparent
    );

    transform: rotate(25deg) translateX(-80%);

    transition: transform .6s ease;
}

.send-btn:hover::before {
    transform: rotate(25deg) translateX(80%);
}

.send-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 18px 38px rgba(242,160,74,.38);
}

.send-btn:active {
    transform: scale(.92);
}

.send-btn svg {
    position: relative;
    z-index: 1;

    width: 18px;
    height: 18px;

    stroke-width: 2.4;
}



/* =========================================================
   TYPING
   ========================================================= */

.typing-dots {
    display: flex;
    align-items: center;
    gap: 5px;

    padding: 4px 0;
}

.typing-dots span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--primary-light);

    animation: typingWave 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: .18s;
}

.typing-dots span:nth-child(3) {
    animation-delay: .36s;
}

@keyframes typingWave {
    0%,60%,100% {
        transform: translateY(0);
        opacity: .4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* =========================================================
   AI ASSISTANT
   ========================================================= */

.ai-assistant-card {
    position: fixed;

    right: 22px;
    bottom: 22px;

    width: 220px;

    padding: 15px;

    border-radius: var(--radius-2xl);

    background: linear-gradient(
        145deg,
        rgba(255,255,255,.94),
        rgba(231,249,250,.86)
    );

    border: 1px solid rgba(34,201,211,.17);

    box-shadow:
        0 35px 90px rgba(7,21,29,.16),
        0 0 50px rgba(34,201,211,.08);

    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);

    z-index: 900;

    overflow: visible;

    transition:
        width .6s var(--ease),
        padding .6s var(--ease),
        left .6s var(--ease),
        right .6s var(--ease),
        top .6s var(--ease),
        bottom .6s var(--ease),
        border-radius .5s ease,
        box-shadow .5s ease,
        transform .6s var(--ease);
}

.assistant-glow {
    position: absolute;

    inset: -65px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(34,201,211,.24),
        transparent 67%
    );

    filter: blur(25px);

    opacity: .4;

    pointer-events: none;

    z-index: -1;

    animation: assistantGlow 4s ease-in-out infinite;
}

@keyframes assistantGlow {
    0%,100% {
        transform: scale(.86);
        opacity: .22;
    }

    50% {
        transform: scale(1.08);
        opacity: .58;
    }
}

.assistant-visual-container {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px 0;
}

.robot-video-main {
    width: 175px;
    height: 175px;

    display: block;

    object-fit: contain;
    object-position: center;

    border-radius: 22px;

    filter: drop-shadow(0 15px 25px rgba(7,21,29,.11));
}

/* =========================================================
   AUDIO WAVES
   ========================================================= */

.audio-waves {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
    z-index: 1;
}

.audio-waves span {
    position: absolute;

    width: 120px;
    height: 120px;

    border: 1px solid rgba(34,201,211,.28);
    border-radius: 50%;

    opacity: 0;
}

.ai-assistant-card.speaking .audio-waves span {
    animation: soundWave 2s ease-out infinite;
}

.audio-waves span:nth-child(1) {
    animation-delay: 0s;
}

.audio-waves span:nth-child(2) {
    animation-delay: .45s;
}

.audio-waves span:nth-child(3) {
    animation-delay: .9s;
}

.audio-waves span:nth-child(4) {
    animation-delay: 1.35s;
}

@keyframes soundWave {
    0% {
        transform: scale(.55);
        opacity: .7;
    }

    100% {
        transform: scale(2.45);
        opacity: 0;
    }
}

/* =========================================================
   ASSISTANT CONTENT
   ========================================================= */

.assistant-content {
    text-align: center;
    padding: 4px 4px 6px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 5px 10px;

    border-radius: var(--radius-pill);

    background: rgba(23,180,126,.075);

    color: var(--success);

    font-family: var(--font-display);
    font-size: 8.5px;
    font-weight: 800;

    border: 1px solid rgba(23,180,126,.14);
}

.status-badge::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--success);

    box-shadow: 0 0 0 4px rgba(23,180,126,.10);

    animation: statusPulse 1.7s ease-in-out infinite;
}

@keyframes statusPulse {
    0%,100% {
        opacity: .55;
    }

    50% {
        opacity: 1;
    }
}

.assistant-content h3 {
    margin-top: 10px;

    font-family: var(--font-display);

    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 800;

    color: var(--ink);
}

.assistant-content p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 9.5px;
    line-height: 1.5;
}

/* =========================================================
   SPEECH
   ========================================================= */

.speech-controls {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 11px;
}

.speak-trigger-btn,
.stop-speech-btn {
    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border-radius: var(--radius-sm);

    font-family: var(--font-display);
    font-size: 9.5px;
    font-weight: 800;

    transition:
        transform .22s var(--ease),
        box-shadow .22s ease;
}

.speak-trigger-btn {
    flex: 1;

    color: #fff;

    background: linear-gradient(
        135deg,
        var(--primary-light),
        var(--primary)
    );

    box-shadow: var(--shadow-primary);
}

.speak-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(7,148,163,.32);
}

.speak-trigger-btn svg {
    width: 15px;
    height: 15px;
}

.stop-speech-btn {
    width: 43px;
    flex-shrink: 0;

    color: var(--danger);

    background: rgba(228,91,91,.065);

    border: 1px solid rgba(228,91,91,.15);
}

.stop-speech-btn:hover {
    transform: translateY(-2px);

    background: rgba(228,91,91,.11);

    box-shadow: 0 10px 22px rgba(228,91,91,.16);
}

.stop-speech-btn svg {
    width: 15px;
    height: 15px;
}

/* =========================================================
   SPEED
   ========================================================= */

.speed-control {
    margin-top: 11px;

    display: grid;

    grid-template-columns: auto 1fr auto;

    align-items: center;

    gap: 8px;
}

.speed-control label,
.language-control label {
    color: var(--muted);

    font-family: var(--font-display);
    font-weight: 800;
}

.speed-control label {
    font-size: 8.5px;
}

.speed-slider {
    width: 100%;
    height: 4px;

    appearance: none;
    -webkit-appearance: none;

    border-radius: var(--radius-pill);

    background: linear-gradient(
        90deg,
        var(--primary-light),
        var(--primary)
    );

    outline: none;
}

.speed-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;

    width: 15px;
    height: 15px;

    border-radius: 50%;

    background: #fff;

    border: 3px solid var(--primary);

    box-shadow: 0 3px 10px rgba(23,166,194,.25);

    cursor: pointer;
}

.speed-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;

    border-radius: 50%;

    background: #fff;

    border: 3px solid var(--primary);

    cursor: pointer;
}

.speed-value {
    min-width: 32px;

    text-align: right;

    color: var(--primary);

    font-family: var(--font-display);

    font-size: 9.5px;
    font-weight: 800;
}

/* =========================================================
   SPEAKING MODE
   ========================================================= */

.ai-assistant-card.speaking {
    left: 50%;
    right: auto;

    top: 50%;
    bottom: auto;

    width: min(620px,86vw);

    transform: translate(-50%,-50%);

    border-radius: 40px;

    padding: 30px;

    background: linear-gradient(
        145deg,
        rgba(255,255,255,.98),
        rgba(229,249,250,.94)
    );

    border-color: rgba(34,201,211,.32);

    box-shadow:
        0 40px 120px rgba(7,21,29,.20),
        0 0 110px rgba(34,201,211,.20);
}

.ai-assistant-card.speaking .assistant-glow {
    opacity: 1;

    animation: talkingGlow 1.4s ease-in-out infinite;
}

@keyframes talkingGlow {
    0%,100% {
        transform: scale(.88);
        opacity: .35;
    }

    50% {
        transform: scale(1.2);
        opacity: .85;
    }
}

.ai-assistant-card.speaking .status-badge {
    background: rgba(34,201,211,.09);

    color: var(--primary-dark);

    border-color: rgba(34,201,211,.20);
}

.ai-assistant-card.speaking .status-badge::before {
    background: var(--primary-light);

    box-shadow:
        0 0 0 5px rgba(34,201,211,.13),
        0 0 15px rgba(34,201,211,.75);
}
/* =========================================================
   AI RESPONSE - YAZI GİRİŞ ANİMASYONU
   ========================================================= */

.ai-message {
    animation: aiTextReveal .35s ease-out both;
}

@keyframes aiTextReveal {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =========================================================
   TOAST NOTIFICATION — LIGHT THEME
   ========================================================= */

.toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;

    display: flex;
    flex-direction: column;
    gap: 12px;

    width: min(390px, calc(100vw - 32px));

    pointer-events: none;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
    position: relative;

    display: flex;
    align-items: center;
    gap: 13px;

    width: 100%;
    padding: 15px 16px;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 17px;

    box-shadow:
        0 20px 55px rgba(15, 23, 42, 0.14),
        0 5px 20px rgba(15, 23, 42, 0.08);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    opacity: 0;

    transform:
        translateY(25px)
        scale(0.96);

    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(.22, 1, .36, 1);

    pointer-events: auto;
    overflow: hidden;
}


/* =========================================================
   SHOW
   ========================================================= */

.toast.show {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   ICON
   ========================================================= */

.toast-icon {
    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #f1f5f9;
    color: #475569;
}

.toast-icon svg {
    width: 21px;
    height: 21px;
}


/* =========================================================
   BAŞARILI
   ========================================================= */

.toast-success {
    border-color: rgba(34, 197, 94, 0.16);
}

.toast-success .toast-icon {
    color: #16a34a;

    background:
        rgba(34, 197, 94, 0.10);
}


/* =========================================================
   HATA
   ========================================================= */

.toast-error {
    border-color: rgba(239, 68, 68, 0.16);
}

.toast-error .toast-icon {
    color: #dc2626;

    background:
        rgba(239, 68, 68, 0.10);
}


/* =========================================================
   CONTENT
   ========================================================= */

.toast-content {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.toast-content strong {
    color: #0f172a;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.3;
}

.toast-content span {
    color: #64748b;

    font-size: 13px;
    line-height: 1.45;

    word-break: break-word;
}


/* =========================================================
   CLOSE
   ========================================================= */

.toast-close {
    flex: 0 0 28px;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: #94a3b8;

    font-size: 21px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.toast-close:hover {
    color: #334155;

    background:
        rgba(15, 23, 42, 0.06);

    transform: scale(1.05);
}


/* =========================================================
   LOADING SPINNER
   ========================================================= */

.complaint-spinner {
    width: 17px;
    height: 17px;

    display: block;

    border: 2px solid rgba(15, 23, 42, 0.12);
    border-top-color: currentColor;

    border-radius: 50%;

    animation:
        complaintSpin 0.7s linear infinite;
}

@keyframes complaintSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   BUTON DISABLED
   ========================================================= */

#complaintSendBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;

    transform: none !important;
}


/* =========================================================
   MOBİL
   ========================================================= */

@media (max-width: 600px) {

    .toast-container {
        right: 16px;
        bottom: 16px;

        width:
            calc(100vw - 32px);
    }

    .toast {
        padding: 14px;
        border-radius: 16px;
    }

    .toast-icon {
        width: 37px;
        height: 37px;
        flex-basis: 37px;
    }

    .toast-content strong {
        font-size: 13px;
    }

    .toast-content span {
        font-size: 12px;
    }

    .toast-close {
        width: 27px;
        height: 27px;
    }
}