/* Floating Chat Widget Styles - Modern Professional Design */
.floating-chat-widget {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9998;
    font-family: 'Cairo', sans-serif;
}

.chat-bubble-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chat-bubble-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-bubble-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 24px rgba(0, 51, 102, 0.35);
}

.chat-bubble-btn:hover::before {
    opacity: 1;
}

.chat-bubble-btn:active {
    transform: scale(0.95);
}

.chat-bubble-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.chat-bubble-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.chat-widget-panel {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 380px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    max-height: 600px;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 51, 102, 0.08);
}

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

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

.chat-widget-header {
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.chat-widget-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
}

.chat-widget-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-widget-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-widget-header-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.chat-widget-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.chat-widget-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.85;
    font-weight: 500;
}

.chat-widget-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.chat-widget-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.chat-widget-body {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 51, 102, 0.2) transparent;
}

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

.chat-widget-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-widget-body::-webkit-scrollbar-thumb {
    background: rgba(0, 51, 102, 0.2);
    border-radius: 3px;
}

.chat-widget-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 51, 102, 0.3);
}

.chat-widget-message {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    animation: fadeInMessage 0.3s ease-out;
}

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

.chat-widget-message.bot {
    justify-content: flex-start;
}

.chat-widget-message.user {
    justify-content: flex-end;
}

.chat-widget-bubble {
    max-width: 75%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-widget-message.bot .chat-widget-bubble {
    background: white;
    color: #333;
    border-radius: 14px 14px 14px 2px;
    border: 1px solid rgba(0, 51, 102, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-widget-message.user .chat-widget-bubble {
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    color: white;
    border-radius: 14px 14px 2px 14px;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.15);
}

.chat-widget-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(0, 51, 102, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: white;
}

.chat-widget-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: white;
    border: 1.5px solid rgba(0, 51, 102, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.chat-widget-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}

.chat-widget-option:hover {
    background: rgba(0, 51, 102, 0.05);
    border-color: rgba(0, 51, 102, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.1);
}

.chat-widget-option:active {
    transform: translateY(0);
}

.chat-widget-option-icon {
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-widget-option-icon svg {
    width: 100%;
    height: 100%;
    stroke: #003366;
    fill: none;
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.chat-widget-option:hover .chat-widget-option-icon svg {
    stroke: #0055AA;
}

.chat-widget-option-text {
    flex: 1;
    text-align: right;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .floating-chat-widget {
        bottom: 1rem;
        left: 1rem;
    }

    .chat-bubble-btn {
        width: 56px;
        height: 56px;
    }

    .chat-widget-panel {
        width: calc(100vw - 2rem);
        max-width: 380px;
        max-height: 70vh;
        bottom: 70px;
    }

    .chat-widget-bubble {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .floating-chat-widget {
        bottom: 0.75rem;
        left: 0.75rem;
    }

    .chat-bubble-btn {
        width: 52px;
        height: 52px;
    }

    .chat-widget-panel {
        width: calc(100vw - 1.5rem);
        bottom: 62px;
    }

    .chat-widget-header {
        padding: 1rem;
    }

    .chat-widget-body {
        padding: 1rem;
    }

    .chat-widget-footer {
        padding: 1rem;
    }
}
