/* Floating Chat Button & Widget */
#floating-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #495057;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s ease;
    border: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(73, 80, 87, 0.4), 0 0 0 0 rgba(73, 80, 87, 0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(73, 80, 87, 0.4), 0 0 0 10px rgba(73, 80, 87, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(73, 80, 87, 0.4), 0 0 0 0 rgba(73, 80, 87, 0);
    }
}

#floating-chat-btn:hover {
    transform: scale(1.1);
    background: #343a40;
    box-shadow: 0 6px 20px rgba(73, 80, 87, 0.6);
    animation: none;
}

#floating-chat-btn i {
    color: white;
    font-size: 28px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-3px);
    }
}

#floating-chat-btn:hover i {
    animation: none;
}

#floating-chat-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Floating Chat Widget */
#floating-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    flex-direction: column;
    max-height: 600px;
    overflow: hidden;
}

#floating-chat-widget.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: #495057;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-header .close-btn:hover {
    transform: rotate(90deg);
}

.chat-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.chat-form .form-group {
    margin-bottom: 15px;
}

.chat-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.chat-form input,
.chat-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.chat-form input:focus,
.chat-form textarea:focus {
    outline: none;
    border-color: #495057;
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.1);
}

.chat-form textarea {
    resize: vertical;
    min-height: 100px;
}

.chat-form .submit-btn {
    width: 100%;
    padding: 12px;
    background: #495057;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-form .submit-btn:hover {
    background: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.4);
}

.chat-form .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chat-form .submit-btn i {
    margin-right: 5px;
}

/* Success Message */
.chat-success {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

.chat-success.active {
    display: block;
}

.chat-success i {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 15px;
}

.chat-success h5 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.chat-success p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
}

.chat-success .btn-new-message {
    padding: 10px 20px;
    background: #495057;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.chat-success .btn-new-message:hover {
    background: #343a40;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #floating-chat-widget {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    #floating-chat-btn {
        bottom: 15px;
        right: 15px;
    }
}
