/* Massive AI Pro - Frontend Styles */
#chat-widget-container {
    position: relative;
    z-index: 10000;
}
/* Toggle Button */
.chat-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
}
.chat-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.chat-toggle-btn.anim-pulse {
    animation: pulse-glow 2s infinite;
}
.chat-toggle-btn.anim-bounce {
    animation: bounce 2s infinite;
}
.chat-toggle-btn.anim-shake {
    animation: shake 2s infinite;
}
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}
@keyframes shake {
    0%,
    100% {
        transform: rotate(0deg);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: rotate(-5deg);
    }
    20%,
    40%,
    60%,
    80% {
        transform: rotate(5deg);
    }
}
/* Chat Window Sizes */
.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-window.size-small {
    width: 280px;
    height: 400px;
}
.chat-window.size-medium {
    width: 340px;
    height: 480px;
}
.chat-window.size-large {
    width: 400px;
    height: 600px;
}
.chat-window.radius-small {
    border-radius: 8px;
}
.chat-window.radius-medium {
    border-radius: 12px;
}
.chat-window.radius-large {
    border-radius: 20px;
}
.chat-window.open {
    transform: scale(1);
    opacity: 1;
}
/* Dark Mode */
.chat-window.dark-mode {
    background: #1e1e1e;
    color: white;
}
.chat-window.dark-mode .chat-messages {
    background: #2d2d2d;
}
.chat-window.dark-mode .message.bot {
    background: #3d3d3d;
    color: white;
}
/* Chat Header */
.chat-header {
    padding: 12px 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
}
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-status-indicator {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
    animation: pulse-online 2s infinite;
    flex-shrink: 0;
}
.chat-status-indicator.offline {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}
@keyframes pulse-online {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}
.chat-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 5px;
}
.beta-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.status-text {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 400;
}
.chat-header button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    opacity: 0.9;
    transition: opacity 0.2s;
    line-height: 1;
}
.chat-header button:hover {
    opacity: 1;
}
/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}
/* Message Bubbles */
.message {
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 16px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease;
}
.message.font-small {
    font-size: 0.8rem;
}
.message.font-medium {
    font-size: 0.9rem;
}
.message.font-large {
    font-size: 1rem;
}
@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.message.bot {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.message.user {
    align-self: flex-end;
    color: white;
    border-bottom-right-radius: 4px;
}
/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f0f0f0;
    border-radius: 16px;
    width: fit-content;
    align-self: flex-start;
}
.typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typing {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}
/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}
.quick-reply-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-reply-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}
/* User Info Form */
.user-info-form {
    padding: 16px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}
.user-info-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    /* Input tasma sorunu için */
}
.user-info-form button {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.user-info-form button:hover {
    background: #1d4ed8;
}
/* Input Area */
.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 8px;
    background: white;
}
.chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
    /* Flexbox taşma sorunu için */
}
.chat-input-area input:focus {
    border-color: #999;
}
.chat-input-area button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.chat-input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.chat-input-area button:active {
    transform: scale(0.95);
}
/* WhatsApp Button */
.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 8px;
    margin: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.whatsapp-btn:hover {
    background: #20ba5a;
}
/* --- MOBİL UYUMLULUK FIX (TAM EKRAN + TRANSFORM RESET) --- */
@media (max-width: 480px) {
    .chat-window {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        /* Transform Reset: Animation çatışmasını önle */
        transform: none !important;
        z-index: 999999 !important;
        /* En üstte */
        display: flex !important;
        /* Gizlenmeyi önle */
    }
    /* Kapalıyken gizle */
    .chat-window:not(.open) {
        display: none !important;
    }
    /* Mobilde headerı rahatlat */
    .chat-header {
        padding: 15px;
        padding-top: max(15px, env(safe-area-inset-top));
        /* Çentikli ekranlar için */
    }
    /* Chat açılınca butonu gizle (yer kaplamasın) */
    .chat-window.open+.chat-toggle-btn,
    .chat-toggle-btn.hidden {
        display: none !important;
    }
}