/* ===================================
   HARTMANN AI WIDGET STYLES
   =================================== */

.hartmann-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* Toggle Button */
.widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.widget-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.widget-icon-chat,
.widget-icon-close {
    color: #ffffff;
    transition: all 0.3s ease;
    position: absolute;
}

.widget-icon-close {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.widget-toggle.active .widget-icon-chat {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.widget-toggle.active .widget-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Widget Window */
.widget-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 600px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.widget-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.widget-header {
    background: #000000;
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.widget-brand {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Content */
.widget-content {
    flex: 1;
    overflow-y: auto;
    background: #f8f9fa;
}

.widget-intro {
    padding: 24px;
    background: #ffffff;
}

.widget-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #000000;
    margin: 0 0 20px 0;
    text-align: center;
}

/* Help Box */
.widget-help-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.help-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.help-box-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.help-box-icon {
    width: 32px;
    height: 32px;
    background: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-box-icon svg {
    color: #ffffff;
}

.help-box-text {
    font-size: 14px;
    color: #666666;
    margin: 0 0 16px 0;
}

.help-box-text strong {
    color: #000000;
    font-weight: 600;
}

.widget-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.widget-btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

/* Contact Options */
.widget-contact {
    padding: 20px 24px 24px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.contact-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #666666;
    margin: 0 0 12px 0;
}

.contact-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #000000;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.contact-option:hover {
    background: #ffffff;
    border-color: #e5e7eb;
    transform: translateX(4px);
}

.contact-option:last-child {
    margin-bottom: 0;
}

.contact-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    color: #000000;
    flex-shrink: 0;
}

.contact-label {
    font-size: 15px;
    font-weight: 500;
    color: #000000;
}

.contact-arrow {
    color: #999999;
    flex-shrink: 0;
}

/* Chat Interface */
.widget-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #000000;
    color: #ffffff;
}

.chat-back {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.chat-back:hover {
    opacity: 0.8;
}

.chat-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

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

.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: #e5e7eb;
    color: #000000;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-message .message-bubble {
    background: #000000;
    color: #ffffff;
}

.message-bubble p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #000000;
}

.user-message .message-bubble p {
    color: #ffffff;
}

/* Chat Input */
.chat-input-wrapper {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.chat-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

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

.chat-input:focus {
    border-color: #000000;
    background: #ffffff;
}

.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000000;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send:hover {
    background: #1a1a1a;
    transform: scale(1.05);
}

.chat-send:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
}

/* Typing Indicator */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    align-items: center;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999999;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar,
.widget-content::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.widget-content::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.widget-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.widget-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .hartmann-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .widget-window {
        width: calc(100vw - 32px);
        max-width: 380px;
        bottom: 76px;
        right: -8px;
    }
    
    .widget-toggle {
        width: 56px;
        height: 56px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    animation: slideInUp 0.3s ease;
}
