/* ===================================
   DIALOG TASARIMI - MİNİMAL CHAT UI
   =================================== */

.mm_dialog {
    padding: 0;
}

.mm_dialog_baslik {
    font-size: 17px;
    font-weight: 600;
    padding: 12px 0;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
    margin-top: 10px;
}

.mm_dialog_baslik::before {
    content: '\f086';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 14px;
}

.mm_dialog ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mm_dialog li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

/* Sol taraf - tek sayılar */
.mm_dialog li:nth-child(odd) {
    flex-direction: row;
}

/* Sağ taraf - çift sayılar */
.mm_dialog li:nth-child(even) {
    flex-direction: row-reverse;
}

/* Avatar */
.mm_dialog1 {
    width: 60px;
    height: 60px;
    min-width: 42px;
    border-radius: 10px;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: var(--avatar-bg, #64748b);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: relative !important;
    display: flex !important;
}

/* Tooltip box - avatar içindeki tooltip div'i bozmaz */
.mm_dialog1 .tooltip-box {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #4e4e4e;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    z-index: 100;
    pointer-events: none;
}

.mm_dialog1 .tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #4e4e4e;
}

.mm_dialog1 .tooltip-box.show {
    opacity: 1;
    visibility: visible;
}

/* Dialog Balonu Container */
.mm_dialog2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

/* Dialog Text */
.mm_dialog_text {
    flex: 1;
}

/* Sol balonlar - odd */
.mm_dialog li:nth-child(odd) .mm_dialog2 {
    align-items: flex-start;
}

.mm_dialog li:nth-child(odd) .mm_dialog2_ic {
    background-color: #f1f5f9;
    border-radius: 2px 16px 16px 16px;
    color: #334155;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.mm_dialog li:nth-child(odd) .mm_dialog2_ic::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #f1f5f9;
}

.mm_dialog li:nth-child(odd) .mm_dialog2_ic::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #f1f5f9;
}

.tearea1{

}
.tearea5{
    background-color: #f2f2f2;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 16px;
}
.tearea10{
    background-color: #f1f5f9;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 16px;
    margin-top: 10px;
}
/* Odd - buton ve yazı */
.mm_dialog li:nth-child(odd) .mm_dialog2_ic .mm_dialog_text {
    flex: 1;
}

.mm_dialog li:nth-child(odd) .mm_dialog2_ic .mm_dialog_play {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    color: #3d618d;
    padding: 40px 14px;
    flex-shrink: 0;
}

.mm_dialog li:nth-child(odd) .mm_dialog2_ic .mm_dialog_play:hover {
    background: #385c89;
    color: #fff;
}

/* Sağ balonlar - even */
.mm_dialog li:nth-child(even) .mm_dialog2 {
    align-items: flex-end;
}

.mm_dialog li:nth-child(even) .mm_dialog2_ic {
    background: #d1fae5;
    border: none;
    border-radius: 16px 2px 16px 16px;
    color: #065f46;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

/* Even - buton ve yazı */
.mm_dialog li:nth-child(even) .mm_dialog2_ic .mm_dialog_text {
    flex: 1;
    text-align: right;
}

.mm_dialog li:nth-child(even) .mm_dialog2_ic .mm_dialog_play {
    background: #fff;
    border: none;
    border-radius: 8px;
    color: #64748b;
    padding: 40px 14px;
    flex-shrink: 0;
}

.mm_dialog li:nth-child(even) .mm_dialog2_ic .mm_dialog_play:hover {
    background: #385c89;
    color: #fff;
}

.mm_dialog li:nth-child(even) .mm_dialog2_ic::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #d1fae5;
}

/* Dialog Metni */
.mm_dialog2_ic {
    font-size: 15px;
    line-height: 1.65;
    padding: 14px 18px;
    max-width: 80%;
    /* width: 100%; */
    word-break: break-word;
}

/* Play Butonu - Balonun yanında */
.mm_dialog_play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mm_dialog_play:hover {
    color: #000;
    opacity: 1;
}

.mm_dialog_play i {
    font-size: 14px;
}

/* Sağ taraftaki play butonu */
.mm_dialog li:nth-child(even) .mm_dialog_play {
    color: #fff;
}

.mm_dialog li:nth-child(even) .mm_dialog_play:hover {
    color: #000;
}

/* Playing state */
.mm_dialog_play.playing {
    color: #ec4899;
    opacity: 1;
    animation: playingPulse 1s ease-in-out infinite;
}

.mm_dialog_play.playing i::before {
    content: '\f028';
}

@keyframes playingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 768px) {
    .mm_dialog1 {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 13px;
    }

    .mm_dialog2_ic {
        font-size: 14px;
        padding: 12px 14px;
        width: 100%;
        max-width: 100%;
    }

    .mm_dialog ul {
        gap: 20px;
    }

    .mm_dialog_play {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .mm_dialog_play i {
        font-size: 12px;
    }
}

/* İsim gösterimi (avatar yerine) */
.mm_dialog1[data-initial]::before {
    content: attr(data-initial);
}

.mm_dialog1:not([data-initial]) {
    font-size: 0.75rem;
    padding: 0 8px;
    min-width: auto;
    width: auto;
    border-radius: 24px;
}

/* ===================================
   TTS BAR - SABİT ALT PANEL
   =================================== */


.tts-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tts-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MODERN TTS BAR TASARIMI
   ======================================== */
.ttsbar {
    position: fixed;
    bottom: 24px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 92%;
    max-width: 400px;
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(80px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ttsbar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ttsbar.hidden {
    display: none;
}

.ttsbar-inner {
    padding: 20px;
}

.ttsbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ttsbar-header strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ttsbar-header strong i {
    font-size: 12px;
    color: #22c55e;
}

.ttsbar-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ttsbar-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.ttsbar-text {
    font-size: 15px;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
    overflow: visible;
    max-height: none;
}

/* Progress Bar */
.ttsbar-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: height 0.2s ease;
}

.ttsbar-progress:hover {
    height: 8px;
}

.ttsbar-progress-fill {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.ttsbar audio {
    display: none;
}

/* Controls */
.ttsbar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.ttsbar-play {
    width: 48px;
    height: 48px;
    border: none;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

.ttsbar-play:hover {
    transform: scale(1.08);
    background: #2563eb;
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

.ttsbar-play:active {
    transform: scale(0.95);
}

.ttsbar-play.loading {
    pointer-events: none;
    background: #475569;
    box-shadow: none;
}

.ttsbar-play.loading i {
    animation: tts-spin 0.8s linear infinite;
}

@keyframes tts-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .ttsbar {
        bottom: 16px;
        width: 94%;
        border-radius: 14px;
    }

    .ttsbar-inner {
        padding: 16px;
    }

    .ttsbar-text {
        font-size: 14px;
    }

    .ttsbar-play {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }
}



/* TTS Button - Seslendir Butonu */
.seslendir,
.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f13131;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}
.seslendir:hover,
.tts-btn:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6);
}
.seslendir:active,
.tts-btn:active {
    transform: scale(0.95);
}
.seslendir.playing,
.tts-btn.playing {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240, 147, 251, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(240, 147, 251, 0); }
}

/* TTS Loading Overlay */
.tts-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.tts-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}
.tts-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ===================================
   DIALOG TEST BUTONU
   =================================== */

.dialog-test-section {
    margin: 24px 0;
}

.btn-dialog-test {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-dialog-test::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-dialog-test:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: #fff;
    text-decoration: none;
}

.btn-dialog-test:hover::before {
    left: 100%;
}

.btn-dialog-test i {
    font-size: 18px;
}

.btn-dialog-test i:last-child {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-dialog-test:hover i:last-child {
    transform: translateX(4px);
}

.btn-dialog-test span {
    flex: 1;
    text-align: center;
}

/* Responsive */
@media (max-width: 576px) {
    .btn-dialog-test {
        padding: 14px 18px;
        font-size: 14px;
        gap: 10px;
    }

    .btn-dialog-test i {
        font-size: 16px;
    }
}

/* ===================================
   DIALOG TEST - BACK BUTTON
   =================================== */

.dialog_actions {
}

.dialog-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #fff;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dialog-back-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.dialog-back-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dialog-back-btn:hover i {
}
