/* ====================
   AI Chat Widget
   ==================== */
.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: var(--glass-gradient);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
}

.chat-widget.active {
    display: flex;
    animation: slideInUp 0.3s ease-out;
}

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

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-agent-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.agent-details h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--charcoal);
}

.status {
    font-size: 0.875rem;
    color: var(--gold);
}

.status.online::before {
    content: '●';
    margin-right: 0.5rem;
    color: #22c55e;
}

.chat-close {
    background: none;
    border: none;
    color: var(--charcoal);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.chat-close:hover {
    background: rgba(17, 19, 24, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlide 0.3s ease-out;
}

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

.message.bot-message {
    align-self: flex-start;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    max-width: 280px;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.bot-message .message-content {
    background: var(--white);
    color: var(--charcoal);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-message .message-content {
    background: var(--gold-gradient);
    color: var(--white);
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 10px rgba(196, 160, 98, 0.3);
}

.quick-prompts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.prompt-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(196, 160, 98, 0.3);
    border-radius: 25px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.prompt-btn:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateX(5px);
}

.chat-input-container {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.voice-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.voice-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(196, 160, 98, 0.4);
}

.voice-btn.listening {
    background: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voice-status {
    flex: 1;
}

.listening-indicator {
    display: none;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ef4444;
    margin-right: 0.5rem;
    animation: blink 1s infinite;
}

.voice-controls.listening .listening-indicator {
    display: inline-block;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.status-text {
    font-size: 0.875rem;
    color: var(--charcoal);
    opacity: 0.7;
}

.chat-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(17, 19, 24, 0.15);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    color: var(--charcoal);
    outline: none;
    transition: var(--transition-smooth);
}

.chat-input input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 160, 98, 0.1);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(196, 160, 98, 0.4);
}

.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ====================
   Loading States
   ==================== */
.loading {
    display: inline-block;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem 1.25rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    animation: typingAnimation 1.5s infinite;
}

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

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

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

/* ====================
   Modal Components
   ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(17, 19, 24, 0.1);
}

.modal-title {
    margin: 0;
    color: var(--charcoal);
    font-size: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--charcoal);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    background: rgba(17, 19, 24, 0.1);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ====================
   Form Components
   ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--charcoal);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(17, 19, 24, 0.1);
    border-radius: var(--border-radius);
    background: var(--white);
    font-size: 1rem;
    color: var(--charcoal);
    transition: var(--transition-smooth);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 160, 98, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-success {
    color: #22c55e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ====================
   Range Slider
   ==================== */
.range-slider {
    margin: 1rem 0;
}

.range-input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-gradient);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-gradient);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--charcoal);
    opacity: 0.7;
}

/* ====================
   Filters Panel
   ==================== */
.filters-panel {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--charcoal);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(17, 19, 24, 0.1);
    border-radius: 20px;
    background: var(--white);
    color: var(--charcoal);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.875rem;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--white);
}

.filters-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ====================
   Animations
   ==================== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

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

/* ====================
   Utility Classes
   ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }