/* ═══════════════════════════════════════════════════════════════
   Zeddro Live Chat Support - Professional Design
   ═══════════════════════════════════════════════════════════════ */

/* Chat Widget Button */
.zeddro-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
}

.chat-bubble svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.chat-bubble .unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

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

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-window.active {
    display: flex;
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.chat-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    padding: 6px;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chat-header-info .status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.chat-header-info .status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-close-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-message.user .chat-message-avatar {
    background: linear-gradient(135deg, #10b981, #059669);
}

.chat-message.system .chat-message-avatar {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.chat-message-content {
    max-width: 70%;
}

.chat-message-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    word-wrap: break-word;
}

.chat-message.user .chat-message-bubble {
    background: #1a73e8;
    color: white;
}

.chat-message.system .chat-message-bubble {
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.chat-message-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-message.user .chat-message-time {
    text-align: right;
}

.chat-message-attachment {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-size: 13px;
}

.chat-message-attachment svg {
    width: 16px;
    height: 16px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.typing-indicator.active {
    display: flex;
}

.typing-indicator-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
}

.typing-indicator-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.typing-indicator-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    animation: bounce 1.4s infinite;
}

.typing-indicator-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Chat Input */
.chat-input {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input-wrap {
    flex: 1;
    position: relative;
}

.chat-input-field {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    outline: none;
    transition: all 0.2s;
}

.chat-input-field:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.chat-input-attach {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.chat-input-attach:hover {
    background: #f1f5f9;
    color: #1a73e8;
}

.chat-input-attach svg {
    width: 20px;
    height: 20px;
}

.chat-send-btn {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Rating Section */
.chat-rating {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.chat-rating h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #1e293b;
}

.chat-rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-rating-star {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
}

.chat-rating-star svg {
    width: 28px;
    height: 28px;
    fill: #cbd5e1;
    transition: all 0.2s;
}

.chat-rating-star:hover svg,
.chat-rating-star.active svg {
    fill: #fbbf24;
    transform: scale(1.1);
}

.chat-rating-feedback {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    margin-top: 8px;
}

.chat-rating-submit {
    margin-top: 12px;
    padding: 10px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-rating-submit:hover {
    background: #1557b0;
}

/* Welcome Form for Guests */
.welcome-form {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.welcome-header {
    margin-bottom: 28px;
}

.welcome-header svg {
    margin-bottom: 16px;
}

.welcome-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.welcome-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.welcome-form-fields {
    width: 100%;
    max-width: 320px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.welcome-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 8px;
}

.welcome-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.welcome-submit-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .zeddro-chat-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .chat-bubble {
        width: 56px;
        height: 56px;
    }
    
    .welcome-form {
        padding: 24px 20px;
    }
}
