/* ==============================================================================
   CONVERSATIONAL WIZARD CHAT STYLES
   ============================================================================== */

/* Overlay */
.wizard-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.wizard-chat-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

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

/* Header */
.wizard-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.wizard-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wizard-title svg {
    color: #10a37f;
}

.wizard-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.wizard-close-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s;
}

.wizard-close-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Progress Bar */
.wizard-progress {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.wizard-progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #10a37f, #059669);
    border-radius: 2px;
    transition: width 0.3s ease-out;
}

.wizard-progress-text {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Messages Container */
.wizard-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

/* Individual Message */
.wizard-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 80%;
    animation: messageSlideIn 0.3s ease-out;
}

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

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

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

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
}

.user-message .message-content {
    background: #10a37f;
    color: white;
}

.assistant-message .message-content {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.message-content p {
    margin: 0;
}

.message-content p + p {
    margin-top: 8px;
}

/* Framework Explanation */
.framework-explanation {
    margin-top: 12px;
    padding: 12px;
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
}

.framework-header {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e40af;
    margin-bottom: 6px;
}

.framework-header svg {
    flex-shrink: 0;
}

.framework-explanation p {
    color: #1e40af;
    font-size: 14px;
}

/* TLL Examples */
.tll-examples {
    margin-top: 16px;
}

.examples-header {
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    font-size: 14px;
}

.example-card {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.example-source {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 6px;
}

.example-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.example-score {
    font-size: 11px;
    color: #10a37f;
    font-weight: 600;
    margin-top: 6px;
}

/* Generated Options */
.generated-options {
    margin-top: 16px;
}

.options-header {
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    font-size: 14px;
}

.option-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: #10a37f;
    background: #f0fdf4;
}

.option-number {
    background: #10a37f;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.option-text {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 16px 20px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typingBounce 1.4s infinite;
}

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

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

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Input Container */
.wizard-input-container {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: white;
}

.wizard-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.wizard-input-wrapper textarea {
    flex: 1;
    min-height: 60px;
    max-height: 150px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    resize: vertical;
    transition: all 0.2s;
}

.wizard-input-wrapper textarea:focus {
    outline: none;
    border-color: #10a37f;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.wizard-input-wrapper textarea:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.wizard-send-btn {
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-send-btn:hover:not(:disabled) {
    background: #059669;
    transform: scale(1.05);
}

.wizard-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.wizard-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.wizard-send-btn.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.wizard-input-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wizard-chat-modal {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .wizard-message {
        max-width: 90%;
    }

    .wizard-header {
        padding: 16px;
    }

    .wizard-title h2 {
        font-size: 18px;
    }

    .wizard-messages {
        padding: 16px;
    }

    .wizard-input-container {
        padding: 12px 16px;
    }
}

/* Scrollbar Styling */
.wizard-messages::-webkit-scrollbar {
    width: 8px;
}

.wizard-messages::-webkit-scrollbar-track {
    background: #f9fafb;
}

.wizard-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.wizard-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
