/* ============================================
   Canlı Destek Widget - Modern Tasarım
   ============================================ */

/* CSS Variables - Özgün Renk Paleti */
:root {
    /* Ana Renkler - Mor/Mavi Gradient */
    --chat-primary-color: #6366f1;
    --chat-primary-hover: #4f46e5;
    --chat-secondary-color: #8b5cf6;
    --chat-secondary-hover: #7c3aed;
    --chat-accent-color: #ec4899;
    --chat-accent-hover: #db2777;
    
    /* Arka Plan Renkleri */
    --chat-background-color: #fafafa;
    --chat-background-gradient: #f8f9ff;
    --chat-surface-color: #ffffff;
    --chat-surface-elevated: #ffffff;
    
    /* Metin Renkleri */
    --chat-text-color: #1e293b;
    --chat-text-secondary: #64748b;
    --chat-text-light: #94a3b8;
    --chat-text-muted: #cbd5e1;
    
    /* Border ve Ayırıcılar */
    --chat-border-color: #e2e8f0;
    --chat-divider-color: #f1f5f9;
    
    /* Mesaj Balonları - Özgün Tasarım */
    --chat-user-bubble-color: #6366f1;
    --chat-user-bubble-text: #ffffff;
    --chat-support-bubble-color: #ffffff;
    --chat-support-bubble-border: #e2e8f0;
    --chat-support-bubble-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    
    /* Durum Renkleri */
    --chat-error-color: #ef4444;
    --chat-error-light: #fef2f2;
    --chat-success-color: #10b981;
    --chat-success-light: #ecfdf5;
    --chat-warning-color: #f59e0b;
    --chat-warning-light: #fffbeb;
    --chat-info-color: #3b82f6;
    --chat-info-light: #eff6ff;
    
    /* Gölge Efektleri */
    --chat-shadow-sm: 0 1px 3px rgba(99, 102, 241, 0.1), 0 1px 2px rgba(99, 102, 241, 0.06);
    --chat-shadow-md: 0 4px 6px rgba(99, 102, 241, 0.1), 0 2px 4px rgba(99, 102, 241, 0.06);
    --chat-shadow-lg: 0 10px 15px rgba(99, 102, 241, 0.1), 0 4px 6px rgba(99, 102, 241, 0.05);
    --chat-shadow-xl: 0 20px 25px rgba(99, 102, 241, 0.1), 0 10px 10px rgba(99, 102, 241, 0.04);
    --chat-shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Border Radius */
    --chat-radius-sm: 6px;
    --chat-radius-md: 10px;
    --chat-radius-lg: 14px;
    --chat-radius-xl: 18px;
    --chat-radius-2xl: 24px;
    --chat-radius-full: 9999px;
    
    /* Transitions */
    --chat-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --chat-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --chat-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Widget Container
   ============================================ */

.live-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   Open Button - Modern Floating Action Button
   ============================================ */

.live-chat-widget .chat-open-button {
    background: var(--chat-primary-color);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: var(--chat-radius-full);
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--chat-shadow-lg), var(--chat-shadow-glow);
    transition: var(--chat-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.live-chat-widget .chat-open-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.live-chat-widget .chat-open-button:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--chat-shadow-xl);
}

.live-chat-widget .chat-open-button:hover::before {
    width: 300px;
    height: 300px;
}

.live-chat-widget .chat-open-button:active {
    transform: scale(0.98);
}

/* ============================================
   Chat Popup - Modern Card Design
   ============================================ */

.live-chat-widget .chat-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    height: 620px;
    max-height: 85vh;
    background: var(--chat-surface-color);
    border-radius: var(--chat-radius-2xl);
    box-shadow: var(--chat-shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.05);
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition: var(--chat-transition);
    backdrop-filter: blur(20px);
    border: 1px solid var(--chat-border-color);
}

.live-chat-widget .chat-popup.active {
    display: flex;
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: slideUpFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpFade {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ============================================
   Header - Enhanced Design
   ============================================ */

.live-chat-widget .chat-header {
    background: var(--chat-primary-color);
    color: white;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: var(--chat-radius-2xl);
    border-top-right-radius: var(--chat-radius-2xl);
    box-shadow: var(--chat-shadow-md);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.live-chat-widget .chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.live-chat-widget .chat-header .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.live-chat-widget .header-title .agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background-color: #fff;
    box-shadow: var(--chat-shadow-sm);
    transition: var(--chat-transition-fast);
}

.live-chat-widget .header-title .agent-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.live-chat-widget .header-title .agent-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.live-chat-widget .header-title .agent-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.3px;
}

.live-chat-widget .header-title .agent-status {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.live-chat-widget .chat-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.live-chat-widget .chat-header .header-actions button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    opacity: 0.9;
    cursor: pointer;
    transition: var(--chat-transition-fast);
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.live-chat-widget .chat-header .header-actions button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.live-chat-widget .chat-header .header-actions button:active {
    transform: scale(0.95);
}

.live-chat-widget .chat-header .minimize-chat-btn,
.live-chat-widget .chat-header .end-chat-btn {
    font-size: 16px;
}

/* Connection Status Indicator */
.live-chat-widget .connection-status {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-chat-widget .connection-status.visible {
    display: flex;
}

.live-chat-widget .connection-status.error {
    color: #ffeb3b;
}

/* ============================================
   Forms and Views
   ============================================ */

.live-chat-widget .pre-chat-form,
.live-chat-widget .chat-view-error {
    padding: 30px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    background: var(--chat-background-gradient);
    position: relative;
}

.live-chat-widget .pre-chat-form p {
    font-size: 1.15rem;
    margin-bottom: 24px;
    color: var(--chat-primary-color);
    font-weight: 500;
    line-height: 1.6;
}

.live-chat-widget .form-group {
    margin-bottom: 18px;
    text-align: left;
}

.live-chat-widget .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--chat-text-color);
    font-size: 0.9rem;
    letter-spacing: -0.2px;
}

.live-chat-widget .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--chat-border-color);
    border-radius: var(--chat-radius-lg);
    background-color: var(--chat-surface-color);
    font-size: 0.95rem;
    transition: var(--chat-transition-fast);
    box-shadow: var(--chat-shadow-sm);
    color: var(--chat-text-color);
}

.live-chat-widget .form-control:focus {
    outline: none;
    border-color: var(--chat-primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--chat-shadow-md);
    transform: translateY(-1px);
    background: var(--chat-surface-elevated);
}

.live-chat-widget .btn-primary {
    background: var(--chat-primary-color);
    color: white;
    border: none;
    padding: 14px 20px;
    width: 100%;
    border-radius: var(--chat-radius-lg);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--chat-transition);
    box-shadow: var(--chat-shadow-md);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.live-chat-widget .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.live-chat-widget .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--chat-shadow-lg);
}

.live-chat-widget .btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.live-chat-widget .btn-primary:active {
    transform: translateY(0);
}

.live-chat-widget .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Error View
   ============================================ */

.live-chat-widget .chat-view-error {
    color: var(--chat-error-color);
}

.live-chat-widget .chat-view-error i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.live-chat-widget .chat-view-error h6 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.live-chat-widget .chat-view-error .chat-error-message {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--chat-light-text-color);
}

.live-chat-widget .reset-chat-btn {
    margin-top: 24px;
}

/* ============================================
   Chat View
   ============================================ */

.live-chat-widget .chat-view {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: var(--chat-background-gradient);
    position: relative;
}

.live-chat-widget .chat-messages {
    flex-grow: 1;
    padding: 20px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

/* Modern Scrollbar */
.live-chat-widget .chat-messages::-webkit-scrollbar {
    width: 6px;
}

.live-chat-widget .chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.live-chat-widget .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.live-chat-widget .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ============================================
   Messages - Enhanced Bubbles
   ============================================ */

.live-chat-widget .message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--chat-radius-md);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    animation: messageSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-chat-widget .message.user {
    background: var(--chat-user-bubble-color);
    color: var(--chat-user-bubble-text);
    align-self: flex-end;
    border-bottom-right-radius: var(--chat-radius-sm);
    border-top-left-radius: var(--chat-radius-lg);
    border-top-right-radius: var(--chat-radius-lg);
    border-bottom-left-radius: var(--chat-radius-lg);
    box-shadow: var(--chat-shadow-md);
    margin-left: auto;
    position: relative;
}

.live-chat-widget .message.support {
    background: var(--chat-support-bubble-color);
    align-self: flex-start;
    border-bottom-left-radius: var(--chat-radius-sm);
    border-top-left-radius: var(--chat-radius-lg);
    border-top-right-radius: var(--chat-radius-lg);
    border-bottom-right-radius: var(--chat-radius-lg);
    box-shadow: var(--chat-support-bubble-shadow);
    border: 1px solid var(--chat-support-bubble-border);
}

.live-chat-widget .message .sender {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--chat-primary-color);
    letter-spacing: -0.2px;
}

.live-chat-widget .message .text-content {
    font-size: 0.95rem;
    color: var(--chat-text-color);
    line-height: 1.5;
}

.live-chat-widget .message.user .text-content {
    color: var(--chat-user-bubble-text);
}

.live-chat-widget .message-time {
    font-size: 0.7rem;
    color: var(--chat-text-light);
    align-self: flex-end;
    margin-top: 4px;
    margin-left: 8px;
    opacity: 0.7;
}

.live-chat-widget .message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.live-chat-widget .message.system-message {
    align-self: center;
    text-align: center;
    font-size: 0.9rem;
    color: var(--chat-text-secondary);
    background-color: transparent;
    box-shadow: none;
    max-width: 95%;
    padding: 8px 12px;
}

.live-chat-widget .message.system-message.error {
    background-color: var(--chat-error-light);
    color: var(--chat-error-color);
    border-radius: var(--chat-radius-sm);
    padding: 12px 16px;
    font-weight: 500;
    border: 1px solid rgba(255, 92, 92, 0.2);
    box-shadow: 0 2px 8px rgba(255, 92, 92, 0.1);
}

.live-chat-widget .message.system-message.welcome-message {
    background-color: var(--chat-support-bubble-color);
    color: var(--chat-text-color);
    text-align: left;
    border-left: 4px solid var(--chat-primary-color);
    padding: 14px 18px;
    border-radius: var(--chat-radius-sm);
    align-self: stretch;
    max-width: 100%;
    box-shadow: var(--chat-shadow-sm);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.live-chat-widget .attachment-wrapper {
    margin-top: 8px;
}

.live-chat-widget .attachment-wrapper img {
    max-width: 100%;
    max-height: 220px;
    border-radius: var(--chat-radius-sm);
    display: block;
    object-fit: cover;
    cursor: pointer;
    transition: var(--chat-transition-fast);
    box-shadow: var(--chat-shadow-sm);
}

.live-chat-widget .attachment-wrapper img:hover {
    transform: scale(1.02);
    box-shadow: var(--chat-shadow-md);
}

.live-chat-widget .typing-indicator {
    padding: 8px 20px;
    font-style: italic;
    color: var(--chat-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-chat-widget .typing-indicator::before {
    content: '●';
    animation: typingDot 1.4s infinite;
}

.live-chat-widget .typing-indicator::after {
    content: '●●';
    animation: typingDot 1.4s infinite 0.2s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

/* ============================================
   Chat Footer - Enhanced Input Area
   ============================================ */

.live-chat-widget .chat-footer {
    padding: 16px;
    background: var(--chat-surface-elevated);
    border-top: 2px solid var(--chat-divider-color);
    position: relative;
    box-shadow: 0 -2px 10px rgba(99, 102, 241, 0.05);
}

.live-chat-widget .chat-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.live-chat-widget .chat-form .input-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
    background: var(--chat-surface-color);
    border-radius: var(--chat-radius-xl);
    padding: 4px 8px;
    border: 2px solid var(--chat-border-color);
    transition: var(--chat-transition-fast);
    box-shadow: var(--chat-shadow-sm);
    min-height: 48px;
}

.live-chat-widget .chat-form .input-group:focus-within {
    border-color: var(--chat-primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--chat-shadow-md);
    background: var(--chat-surface-elevated);
}

.live-chat-widget .chat-form.error .input-group {
    border-color: var(--chat-error-color);
    box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.1);
}

.live-chat-widget .chat-input {
    border: none;
    flex-grow: 1;
    padding: 10px 8px;
    background: transparent;
    resize: none;
    overflow-y: hidden;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--chat-text-color);
}

.live-chat-widget .chat-input:focus {
    outline: none;
}

.live-chat-widget .chat-input::placeholder {
    color: var(--chat-text-light);
    opacity: 0.7;
}

.live-chat-widget .menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--chat-text-secondary);
    cursor: pointer;
    padding: 10px;
    border-radius: var(--chat-radius-full);
    transition: var(--chat-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.live-chat-widget .menu-btn:hover {
    color: var(--chat-primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.1) rotate(15deg);
}

.live-chat-widget .menu-btn:active {
    transform: scale(0.95);
}

.live-chat-widget .send-btn {
    background: var(--chat-primary-color);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: var(--chat-radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: var(--chat-transition);
    box-shadow: var(--chat-shadow-md);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.live-chat-widget .send-btn:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: var(--chat-shadow-md);
}

.live-chat-widget .send-btn:active {
    transform: scale(0.95);
}

.live-chat-widget .send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Character Counter - Single Clean Definition */
.live-chat-widget .char-counter {
    display: none;
    font-size: 0.75rem;
    text-align: right;
    padding: 4px 16px 0 0;
    color: var(--chat-text-secondary);
    font-weight: 500;
}

.live-chat-widget .char-counter.visible {
    display: block;
}

.live-chat-widget .char-counter.error {
    color: var(--chat-error-color);
    font-weight: 700;
}

/* ============================================
   Image Preview - Enhanced Design
   ============================================ */

.live-chat-widget .image-preview {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px;
    background: var(--chat-divider-color);
    border-radius: var(--chat-radius-lg);
    margin-bottom: 12px;
    gap: 12px;
    cursor: grab;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    border: 1px solid var(--chat-border-color);
}

.live-chat-widget .image-preview.active {
    cursor: grabbing;
    user-select: none;
}

.live-chat-widget .image-preview::-webkit-scrollbar {
    height: 6px;
}

.live-chat-widget .image-preview::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.live-chat-widget .image-preview::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.live-chat-widget .image-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.live-chat-widget .preview-container {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    border-radius: var(--chat-radius-sm);
    overflow: hidden;
    box-shadow: var(--chat-shadow-sm);
    transition: var(--chat-transition-fast);
}

.live-chat-widget .preview-container:hover {
    transform: scale(1.05);
    box-shadow: var(--chat-shadow-md);
}

.live-chat-widget .preview-img {
    width: 88px;
    height: 88px;
    border-radius: var(--chat-radius-sm);
    object-fit: cover;
    display: block;
}

.live-chat-widget .remove-image-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--chat-error-color);
    color: white;
    border: 2px solid white;
    border-radius: var(--chat-radius-full);
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--chat-transition-fast);
    box-shadow: var(--chat-shadow-md);
}

.live-chat-widget .remove-image-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: var(--chat-shadow-md);
}

.live-chat-widget .preview-info {
    font-size: 0.75rem;
    color: var(--chat-text-secondary);
    margin-top: 6px;
}

/* ============================================
   Rating View - Enhanced Design
   ============================================ */

.live-chat-widget .rating-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px 24px;
    text-align: center;
    background: var(--chat-background-gradient);
    position: relative;
}

.live-chat-widget .rating-view h6 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--chat-text-color);
}

.live-chat-widget .stars {
    font-size: 36px;
    color: #e0e0e0;
    margin-bottom: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    gap: 8px;
    transition: var(--chat-transition-fast);
}

.live-chat-widget .stars .fas.fa-star {
    transition: var(--chat-transition-fast);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.live-chat-widget .stars .fa-star.selected {
    color: var(--chat-warning-color);
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.4));
}

.live-chat-widget .stars:hover .fa-star {
    color: var(--chat-warning-color);
    opacity: 0.6;
}

.live-chat-widget .stars .fa-star:hover {
    opacity: 1;
    transform: scale(1.15);
}

.live-chat-widget .stars .fa-star:hover ~ .fa-star {
    color: #e0e0e0;
    opacity: 1;
}

.live-chat-widget .rating-form {
    margin-top: 8px;
}

.live-chat-widget .rating-form textarea {
    height: 100px;
    margin-bottom: 16px;
    resize: vertical;
    border-radius: var(--chat-radius-md);
    border: 2px solid var(--chat-border-color);
    padding: 12px;
    transition: var(--chat-transition-fast);
}

.live-chat-widget .rating-form textarea:focus {
    outline: none;
    border-color: var(--chat-primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--chat-shadow-sm);
}

.live-chat-widget .rating-error {
    color: var(--chat-error-color);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.live-chat-widget .rating-thanks {
    color: var(--chat-success-color);
    font-weight: 700;
    padding: 24px;
    font-size: 1.1rem;
    animation: fadeInScale 0.5s ease-out;
    background: var(--chat-success-light);
    border-radius: var(--chat-radius-lg);
    border: 2px solid rgba(16, 185, 129, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Footer Brand
   ============================================ */

.live-chat-widget .chat-footer-brand {
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--chat-text-secondary);
    background: var(--chat-divider-color);
    border-top: 1px solid var(--chat-border-color);
}

.live-chat-widget .chat-footer-brand i {
    margin-right: 6px;
    color: var(--chat-warning-color);
}

/* ============================================
   Spam Cooldown Banner
   ============================================ */

.spam-cooldown-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--chat-error-color);
    color: white;
    padding: 14px;
    text-align: center;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 -4px 15px rgba(239, 68, 68, 0.3);
    animation: slideUp 0.3s ease-out;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   Image Modal - Enhanced
   ============================================ */

.jetsunucum-image-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.jetsunucum-image-modal img {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85%;
    border-radius: var(--chat-radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jetsunucum-image-modal .close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 48px;
    font-weight: bold;
    transition: var(--chat-transition-fast);
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.jetsunucum-image-modal .close-modal:hover,
.jetsunucum-image-modal .close-modal:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .live-chat-widget {
        bottom: 15px;
        right: 15px;
    }

    .live-chat-widget .chat-popup {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        max-height: 90vh;
        bottom: 15px;
        right: 15px;
        border-radius: var(--chat-radius-lg);
    }

    .live-chat-widget .chat-open-button {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .live-chat-widget .chat-header {
        padding: 14px 16px;
    }

    .live-chat-widget .header-title .agent-avatar {
        width: 40px;
        height: 40px;
    }

    .live-chat-widget .chat-messages {
        padding: 16px 12px;
        gap: 12px;
    }

    .live-chat-widget .message {
        max-width: 90%;
        padding: 10px 14px;
    }

    .live-chat-widget .send-btn,
    .live-chat-widget .menu-btn {
        width: 40px;
        height: 40px;
    }

    .live-chat-widget .pre-chat-form,
    .live-chat-widget .chat-view-error,
    .live-chat-widget .rating-view {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .live-chat-widget .chat-popup {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .live-chat-widget .chat-header {
        border-radius: 0;
    }

    .live-chat-widget .chat-open-button {
        width: 52px;
        height: 52px;
        font-size: 22px;
        bottom: 12px;
        right: 12px;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

.live-chat-widget *:focus-visible {
    outline: 2px solid var(--chat-primary-color);
    outline-offset: 2px;
}

.live-chat-widget button:focus-visible {
    outline: 2px solid var(--chat-primary-color);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .live-chat-widget {
        display: none;
    }
}
