/* Live Chat Widget Styles - Premium Black & White */
.chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.chat-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chat-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.chat-widget-button svg {
    width: 28px;
    height: 28px;
}

.chat-widget-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.chat-widget-badge.active {
    display: flex;
}

.chat-widget-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-widget-window.open {
    display: flex;
}

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

.chat-widget-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-widget-header p {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.chat-widget-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-widget-close:hover {
    opacity: 1;
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.chat-message.client {
    align-items: flex-end;
}

.chat-message.staff {
    align-items: flex-start;
}

.chat-message.system {
    align-items: center;
}

.chat-message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    word-wrap: break-word;
}

.chat-message.client .chat-message-bubble {
    background: #1a1a1a;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.staff .chat-message-bubble {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.chat-message.system .chat-message-bubble {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 12px;
}

.chat-message-sender {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.chat-message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.chat-widget-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.chat-widget-form {
    display: flex;
    gap: 8px;
}

.chat-widget-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-widget-input:focus {
    border-color: #1a1a1a;
}

.chat-widget-send {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-widget-send:hover {
    background: #000000;
}

.chat-widget-send:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.chat-widget-intro {
    padding: 20px;
    text-align: center;
}

.chat-widget-intro h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 16px;
}

.chat-widget-intro p {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 14px;
}

.chat-widget-intro-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-widget-intro-form .cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

.chat-widget-intro-input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.chat-widget-intro-input:focus {
    border-color: #1a1a1a;
}

.chat-widget-start-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-widget-start-btn:hover {
    background: #000000;
}

@media (max-width: 480px) {
    .chat-widget-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        right: 20px;
        bottom: 100px;
    }
}
