/* Floating Chat Widget Styles */
.floating-chat-widget .chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: system-ui, -apple-system, sans-serif
}

.floating-chat-widget .chat-button {
    position: relative;
    cursor: pointer;
    transition: all .3s ease
}

.floating-chat-widget .chat-button-circle {
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
    transition: all .3s ease
}

.floating-chat-widget .chat-button-circle:hover {
    background: #1d4ed8;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04)
}

.floating-chat-widget .chat-icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

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

.floating-chat-widget .bounce-gentle {
    animation: bounce-gentle 2s infinite
}

@keyframes bounce-gentle {
    0%, 100% {
        transform: translateY(0)
    }
    50% {
        transform: translateY(-4px)
    }
}

.floating-chat-widget .chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 352px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: all .3s ease;
    display: flex;
    flex-direction: column
}

.floating-chat-widget .chat-window.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none
}

.floating-chat-widget .chat-header {
    background: #2563eb;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.floating-chat-widget .chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px
}

.floating-chat-widget .chat-avatar {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px
}

.floating-chat-widget .chat-title {
    font-weight: 600;
    font-size: 14px
}

.floating-chat-widget .chat-status {
    font-size: 12px;
    color: #93c5fd
}

.floating-chat-widget .close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    transition: color .2s
}

.floating-chat-widget .close-button:hover {
    color: #d1d5db
}

.floating-chat-widget .chat-content {
    display: flex;
    flex-direction: column;
    height: 300px
}

.floating-chat-widget .chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.floating-chat-widget .message {
    display: flex;
    gap: 8px;
    align-items: flex-start
}

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

.floating-chat-widget .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px
}

.floating-chat-widget .message-avatar.support {
    background: #dbeafe;
    color: #2563eb
}

.floating-chat-widget .message-avatar.user {
    background: #f3f4f6;
    color: #6b7280
}

.floating-chat-widget .message-bubble {
    max-width: 80%;
    padding: 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4
}

.floating-chat-widget .message-bubble.support {
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 4px
}

.floating-chat-widget .message-bubble.user {
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px
}

.floating-chat-widget .message-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    text-align: center
}

.floating-chat-widget .typing-dots {
    display: flex;
    gap: 4px;
    align-items: center
}

.floating-chat-widget .typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing-pulse 1.4s infinite ease-in-out
}

.floating-chat-widget .typing-dot:nth-child(1) {
    animation-delay: -.32s
}

.floating-chat-widget .typing-dot:nth-child(2) {
    animation-delay: -.16s
}

.floating-chat-widget .typing-dot:nth-child(3) {
    animation-delay: 0s
}

@keyframes typing-pulse {
    0%, 80%, 100% {
        transform: scale(.8);
        opacity: .5
    }
    40% {
        transform: scale(1);
        opacity: 1
    }
}

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

.floating-chat-widget .chat-input-container {
    display: flex;
    gap: 8px;
    align-items: center
}

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

.floating-chat-widget .chat-input:focus {
    border-color: #2563eb
}

.floating-chat-widget .send-button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    font-size: 16px
}

.floating-chat-widget .send-button:hover:not(:disabled) {
    background: #1d4ed8;
    transform: scale(1.05)
}

.floating-chat-widget .send-button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none
}

.floating-chat-widget .chat-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 8px 16px;
    text-align: center
}

.floating-chat-widget .footer-text {
    font-size: 12px;
    color: #9ca3af
}

@media (max-width: 640px) {
    .floating-chat-widget .chat-window {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
        bottom: 80px
    }

    .chat-window {
        left: auto !important;
        right: 0 !important
    }

    .send-button {
        max-width: 40px;
        max-height: 40px;
    }

    .floating-chat-widget .chat-widget {
        right: 16px;
        bottom: 16px
    }
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Menu container */
.menu-container {
    position: relative;
}

.menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #fffcf7;
}

.menu-btn.active {
    background: rgba(0, 124, 186, 0.1);
    color: #e3e3e3;
}

/* Menu dropdown */
.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    animation: menuSlideIn 0.2s ease-out;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.menu-item:only-child {
    border-radius: 8px;
}

.menu-icon {
    font-size: 16px;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading dots animation */
.loading-dots {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    background: #007cba;
    border-radius: 50%;
    animation: loading 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Contact form styles */
.contact-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.contact-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 320px;
}

.contact-form-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    text-align: center;
}

.contact-form-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    text-align: center;
}

.contact-error {
    background: #fee;
    color: #c33;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid #fcc;
}

.contact-form-fields {
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.contact-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.contact-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.contact-input:disabled {
    background: #f5f5f5;
    color: #999;
}

.contact-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.contact-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.contact-btn-cancel:hover:not(:disabled) {
    background: #e5e5e5;
}

.contact-btn-submit {
    background: #007cba;
    color: white;
}

.contact-btn-submit:hover:not(:disabled) {
    background: #005a87;
}


.floating-chat-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.floating-chat-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.floating-chat-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.floating-chat-widget.top-right {
    top: 20px;
    right: 20px;
}

.floating-chat-widget.top-left {
    top: 20px;
    left: 20px;
}

.chat-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007cba;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-widget-button:hover {
    background: #005a87;
    transform: scale(1.1);
}

.chat-widget-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

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

.chat-widget-header {
    background: #007cba;
    color: white;
    padding: 16px;
    font-weight: 600;
}

.chat-widget-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.chat-widget-input {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
}

.chat-widget-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

.chat-widget-input input:focus {
    border-color: #007cba;
}

.chat-button {
    z-index: 9998;
}

.chat-window {
    z-index: 9999;
}
