/**
 * DR.Wit Interview Chat Interface Styles
 */

.drwit-chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.drwit-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.drwit-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.drwit-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.drwit-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f7f9fc;
    scroll-behavior: smooth;
}

.drwit-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

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

.drwit-avatar {
    min-width: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: #667eea;
}

.drwit-message-user .drwit-avatar {
    background: #48bb78;
}

.drwit-message-system .drwit-avatar {
    background: #4299e1;
}

.drwit-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
    word-wrap: break-word;
}

.drwit-message-user .drwit-message-content {
    background: #667eea;
    color: white;
}

.drwit-message-system .drwit-message-content {
    background: #edf2f7;
    color: #2d3748;
    font-style: italic;
}

.drwit-typing-indicator {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

.drwit-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

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

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

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

.drwit-input-container {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.drwit-input-container textarea {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.drwit-input-container textarea:focus {
    outline: none;
    border-color: #667eea;
}

.drwit-input-container textarea:disabled {
    background: #f7fafc;
    cursor: not-allowed;
}

.drwit-btn-primary {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.drwit-btn-primary:hover:not(:disabled) {
    background: #5568d3;
}

.drwit-btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.drwit-btn-secondary {
    padding: 12px 32px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.drwit-btn-secondary:hover:not(:disabled) {
    background: #38a169;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.drwit-btn-secondary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.drwit-complete-container {
    background: #f0fff4;
    border-top: 2px solid #48bb78;
    padding: 15px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

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

.drwit-error {
    padding: 12px;
    background: #fed7d7;
    color: #c53030;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

.drwit-success-message {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    animation: fadeIn 0.5s ease-in;
}

.drwit-success-icon {
    width: 80px;
    height: 80px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.drwit-success-message h3 {
    color: #2d3748;
    margin: 0 0 15px 0;
    font-size: 24px;
}

.drwit-success-message p {
    color: #4a5568;
    line-height: 1.6;
    margin: 10px 0;
}

.drwit-success-message strong {
    color: #667eea;
}

.drwit-next-steps {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
}

.drwit-next-steps h4 {
    margin: 0 0 15px 0;
    color: #2d3748;
}

.drwit-next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drwit-next-steps li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: #4a5568;
}

.drwit-next-steps li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.drwit-footer {
    padding: 15px;
    text-align: center;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.drwit-footer p {
    margin: 0;
    color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
    .drwit-chat-container {
        border-radius: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .drwit-header {
        padding: 20px;
    }
    
    .drwit-header h2 {
        font-size: 22px;
    }
    
    .drwit-messages {
        flex: 1;
        height: auto;
    }
    
    .drwit-message-content {
        max-width: 85%;
    }
    
    .drwit-input-container {
        padding: 15px;
    }
    
    .drwit-success-message {
        padding: 20px;
    }
}

/* Custom Scrollbar */
.drwit-messages::-webkit-scrollbar {
    width: 6px;
}

.drwit-messages::-webkit-scrollbar-track {
    background: #edf2f7;
}

.drwit-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.drwit-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
