/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}

.chat-widget.visible {
    transform: translateY(0);
    opacity: 1;
}

.chat-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
}

.chat-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.4);
}

.chat-widget-button.hidden {
    transform: scale(0);
    opacity: 0;
}

/* Chat Widget Header */
.chat-widget-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.chat-widget-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.chat-widget-close:hover {
    opacity: 1;
}

/* Chat Messages Area */
.chat-widget-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

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

.chat-message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.bot .chat-message-content {
    background: var(--white);
    border: 1px solid rgba(74, 144, 226, 0.1);
    color: var(--text-primary);
}

.chat-message.user .chat-message-content {
    background: var(--glass-blue);
    color: var(--white);
}

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

.chat-message.bot .chat-message-avatar {
    background: var(--gradient-primary);
    color: var(--white);
}

.chat-message.user .chat-message-avatar {
    background: #e9ecef;
    color: var(--text-primary);
}

/* Chat Input */
.chat-widget-input {
    padding: 1rem;
    border-top: 1px solid rgba(74, 144, 226, 0.1);
    background: var(--white);
}

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

.chat-input-field {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input-field:focus {
    border-color: var(--glass-blue);
}

.chat-input-send {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.chat-input-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.chat-input-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Demo Badge */
.chat-demo-badge {
    background: #ffc107;
    color: #212529;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Conversation Starters */
.chat-starters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chat-starter-button {
    background: var(--white);
    border: 1px solid rgba(74, 144, 226, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.chat-starter-button:hover {
    border-color: var(--glass-blue);
    background: rgba(74, 144, 226, 0.05);
}

/* Loading Animation */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.1);
    max-width: 70%;
}

.chat-loading-dots {
    display: flex;
    gap: 0.25rem;
}

.chat-loading-dot {
    width: 6px;
    height: 6px;
    background: var(--glass-blue);
    border-radius: 50%;
    animation: chatLoadingDot 1.4s ease-in-out infinite both;
}

.chat-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-loading-dot:nth-child(2) { animation-delay: -0.16s; }
.chat-loading-dot:nth-child(3) { animation-delay: 0s; }

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chat-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        transform: translateX(100%);
    }
    
    .chat-widget.visible {
        transform: translateX(0);
    }
    
    .chat-widget-button {
        bottom: 15px;
        right: 15px;
    }
}

/* Registration Form Styles */
.registration-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.registration-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.registration-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.registration-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input, .form-select, .form-textarea {
    padding: 0.75rem;
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--glass-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-submit {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-top: 1rem;
    text-align: center;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-top: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .registration-form {
        padding: 2rem 1.5rem;
    }
    
    .registration-title {
        font-size: 2rem;
    }
}
