/**
 * Conversational Onboarding Styles
 * Mobile-first, single-column layout with modern conversational UI
 */

/* Main container */
.conversational-onboarding-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    min-height: 400px;
    max-width: 600px;
    margin: 0 auto;
    /* Prevent horizontal overflow */
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Assistant message bubble */
.assistant-message-bubble {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: slideInLeft 0.3s ease-out;
}

.assistant-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2181FF 0%, #3a55ad 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.assistant-message-text {
    flex: 1;
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.assistant-message-text p {
    margin: 0 0 0.5rem 0;
}

.assistant-message-text p:last-child {
    margin-bottom: 0;
}

/* Input areas */
.conversational-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: slideInUp 0.3s ease-out;
}

/* Choice buttons */
.choice-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.choice-button {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 0.75rem;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.choice-button:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

.choice-button:active {
    transform: translateX(2px);
}

/* Text input */
.text-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conversational-text-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.conversational-text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.conversational-submit-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #2181FF 0%, #3a55ad 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.conversational-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.conversational-submit-btn:active {
    transform: translateY(0);
}

.signup-btn-primary {
    width: 100%;
    align-self: stretch;
    font-size: 1.125rem;
}

/* Multi-select (tags) */
.multi-select-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.5rem;
    border: 2px dashed #e0e0e0;
    border-radius: 0.75rem;
}

.tags-container:empty::before {
    content: 'Your skills will appear here';
    color: #999;
    font-style: italic;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.remove-tag {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease;
    /* Add larger touch target without affecting visual size */
    position: relative;
}

.remove-tag::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* File upload */
.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload-area svg {
    margin: 0 auto 1rem;
    color: #667eea;
}

.file-upload-area p {
    margin: 0.5rem 0;
    color: #333;
    font-weight: 500;
}

.file-type-hint {
    font-size: 0.875rem;
    color: #666 !important;
    font-weight: 400 !important;
}

.file-size {
    font-size: 0.875rem;
    color: #666 !important;
    margin-top: 0.25rem !important;
}

.change-file-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-file-btn:hover {
    background: #667eea;
    color: white;
}

/* Error messages */
.conversational-error-message {
    padding: 0.75rem 1rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 0.5rem;
    color: #c33;
    font-size: 0.875rem;
    font-weight: 500;
}

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .conversational-onboarding-container {
        padding: 1rem;
        gap: 1rem;
    }

    /* Ensure 44x44px minimum tap target for avatar */
    .assistant-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }

    .assistant-message-text {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    /* Ensure 44px minimum height for choice buttons */
    .choice-button {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
        min-height: 44px;
    }

    .conversational-text-input {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        min-height: 44px;
    }

    /* Ensure 44px minimum height for submit buttons */
    .conversational-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        min-height: 44px;
    }

    .file-upload-area {
        padding: 1.5rem 1rem;
    }
}

/* Ensure modal is full-height on mobile */
@media (max-width: 576px) {
    .modal.search__modal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }

    .modal.search__modal .modal-content {
        height: 100%;
        border-radius: 0;
    }

    .modal.search__modal .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .conversational-onboarding-container {
        min-height: auto;
        padding-bottom: 2rem;
    }
}

/* Extra small devices (iPhone SE, etc.) */
@media (max-width: 375px) {
    .conversational-onboarding-container {
        padding: 0.875rem;
        gap: 0.875rem;
    }

    .assistant-message-text {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .choice-button {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .conversational-text-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .conversational-submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
    }

    .signup-btn-primary {
        font-size: 1rem;
    }

    .file-upload-area {
        padding: 1rem 0.75rem;
    }

    .file-upload-area p {
        font-size: 0.875rem;
    }

    .file-type-hint {
        font-size: 0.75rem !important;
    }
}

/* Prevent horizontal scroll globally */
.modal.search__modal .modal-body * {
    max-width: 100%;
}

.conversational-onboarding-container * {
    box-sizing: border-box;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .assistant-message-text {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .choice-button {
        background: #1e1e1e;
        border-color: #444;
        color: #e0e0e0;
    }

    .choice-button:hover {
        background: #2a2a3e;
        border-color: #667eea;
    }

    .conversational-text-input {
        background: #1e1e1e;
        border-color: #444;
        color: #e0e0e0;
    }

    .file-upload-area {
        background: #1e1e1e;
        border-color: #444;
    }

    .file-upload-area:hover {
        background: #2a2a3e;
    }
}

/* Loading state */
.conversational-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.conversational-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
