/* Enhanced Modal Styles for Improved Visibility and UI */

/* Modal Backdrop Enhancement */
.modal-backdrop {
    background: linear-gradient(45deg, rgba(15, 23, 42, 0.85), rgba(30, 27, 75, 0.85));
    backdrop-filter: blur(8px);
}

/* Enhanced Modal Container - No Animations */
.modal.fade .modal-dialog {
    transform: none;
    transition: none;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Modal Enhanced Styles - No Animations */
.modal-enhanced {
    background: linear-gradient(145deg,
        rgba(30, 27, 75, 0.98) 0%,
        rgba(15, 23, 42, 0.98) 100%);
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Removed gradient border effect for cleaner look */

/* Enhanced Modal Header */
.modal-header-enhanced {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    background: linear-gradient(135deg,
        rgba(96, 165, 250, 0.1) 0%,
        rgba(168, 85, 247, 0.1) 100%);
    border-radius: 24px 24px 0 0;
    position: relative;
}

/* Compact header for profile modal */
#editProfileModal .modal-header-enhanced {
    padding: 1rem 1.5rem 0.75rem;
}

#editProfileModal .modal-title-enhanced div h5 {
    font-size: 1.1rem;
}

#editProfileModal .modal-title-enhanced div small {
    font-size: 0.8rem;
}

.modal-title-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.modal-title-enhanced i {
    font-size: 1.8rem;
    color: var(--accent-blue);
    padding: 0.5rem;
    background: rgba(96, 165, 250, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.modal-title-enhanced div h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-title-enhanced div small {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: block;
}

/* Enhanced Close Button - No Animations */
.btn-close-enhanced {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.btn-close-enhanced:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    color: white;
}

/* Enhanced Modal Body */
.modal-body-enhanced {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0;
    position: relative;
}

/* Compact body for profile modal */
#editProfileModal .modal-body-enhanced {
    padding: 1rem 1.5rem;
}

/* Enhanced Form Groups */
.form-group-enhanced {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label-enhanced {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label-enhanced i {
    color: var(--accent-blue);
    font-size: 1.1rem;
    padding: 0.4rem;
    background: rgba(96, 165, 250, 0.15);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

/* Enhanced Form Controls */
.form-control-enhanced {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.form-control-enhanced:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-blue);
    box-shadow:
        0 0 0 4px rgba(96, 165, 250, 0.25),
        0 8px 25px rgba(96, 165, 250, 0.15);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.form-control-enhanced::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Enhanced Textarea */
textarea.form-control-enhanced {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Enhanced File Input */
input[type="file"].form-control-enhanced {
    padding: 0.75rem;
    cursor: pointer;
}

input[type="file"].form-control-enhanced::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-right: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

input[type="file"].form-control-enhanced::-webkit-file-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4);
}

/* Enhanced Modal Footer */
.modal-footer-enhanced {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(96, 165, 250, 0.05) 100%);
    border-radius: 0 0 24px 24px;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
}

/* Compact footer for profile modal */
#editProfileModal .modal-footer-enhanced {
    padding: 0.75rem 1.5rem 1rem;
    gap: 0.75rem;
}

#editProfileModal .btn-secondary-enhanced,
#editProfileModal .btn-primary-enhanced {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Enhanced Buttons - No Animations */
.btn-secondary-enhanced {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.btn-secondary-enhanced:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
}

.btn-warning-enhanced {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 2px solid #f59e0b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-warning-enhanced:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #d97706;
    color: white;
}

.btn-primary-enhanced {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: 2px solid var(--accent-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.btn-primary-enhanced:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #3b82f6;
    color: white;
}

.btn-danger-enhanced {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 2px solid #ef4444;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger-enhanced:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #dc2626;
    color: white;
}

/* Chat Modal Specific Enhancements */
.chat-messages-enhanced {
    height: 320px;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(15, 23, 42, 0.3));
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(15px);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 4px 20px rgba(96, 165, 250, 0.1);
    margin-bottom: 1rem;
    padding: 1rem;
    position: relative;
}

.welcome-message {
    text-align: center;
    padding: 1rem;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.welcome-icon i {
    font-size: 1.5rem;
    color: white;
}

.welcome-message h6 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-message p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.quick-prompt-btn {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.quick-prompt-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: var(--accent-blue);
}

.quick-prompt-btn i {
    font-size: 0.8rem;
}

.chat-input-container {
    margin-top: 1rem;
    position: relative;
}

.input-group-enhanced {
    display: flex;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.input-group-enhanced .form-control-enhanced {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group-enhanced .btn-primary-enhanced {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 1px solid rgba(96, 165, 250, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.input-help {
    text-align: center;
    padding: 0.25rem;
    margin-top: 0.25rem;
}

.input-help small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.input-help i {
    color: var(--accent-blue);
    font-size: 0.7rem;
}

.chat-loading-enhanced {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(96, 165, 250, 0.3);
    z-index: 10;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
}

.loading-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-thinking {
    font-weight: 500;
    color: var(--accent-blue);
}

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

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
}

#chatInput {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1rem;
    transition: all 0.3s ease;
    height: auto;
    min-height: 48px;
}

#chatInput:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
    outline: none;
}

#sendButton {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    height: auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#sendButton:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* Loading Spinner Enhancement - No Animations */
.spinner-border {
    border-top-color: var(--accent-blue);
}

/* Summary Modal Content */
.summary-content-enhanced {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(15, 23, 42, 0.3));
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 4px 20px rgba(96, 165, 250, 0.1);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.summary-loading {
    text-align: center;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.loading-animation {
    margin-bottom: 1rem;
}

.brain-animation {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 30px rgba(96, 165, 250, 0.4);
    animation: brainPulse 2s ease-in-out infinite;
    position: relative;
}

@keyframes brainPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 30px rgba(96, 165, 250, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 15px 60px rgba(96, 165, 250, 0.6);
    }
}

.brain-animation::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    opacity: 0.3;
    animation: brainRings 3s linear infinite;
}

@keyframes brainRings {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.brain-animation i {
    font-size: 1.8rem;
    color: white;
    animation: brainIcon 2s ease-in-out infinite;
}

@keyframes brainIcon {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.loading-progress {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), #f59e0b);
    border-radius: 10px;
    width: 100%;
    position: relative;
}

.loading-stages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
}

.stage {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.stage.active {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
    color: var(--accent-blue);
}

.stage.completed {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.stage i {
    font-size: 1.2rem;
    width: 24px;
    flex-shrink: 0;
}

.stage span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Summary Results Display - No Animations */
.summary-result {
    display: none;
}

.summary-result.show {
    display: block;
}

.summary-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-stat {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.summary-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: block;
}

.summary-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-header-enhanced {
        padding: 1rem 1rem 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-body-enhanced {
        padding: 1rem;
    }

    .modal-footer-enhanced {
        padding: 0.75rem 1rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer-enhanced .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-title-enhanced {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .btn-close-enhanced {
        width: 36px;
        height: 36px;
    }

    .chat-messages-enhanced {
        height: 250px;
        padding: 0.75rem;
    }

    .welcome-message {
        padding: 0.75rem;
    }

    .welcome-icon {
        width: 50px;
        height: 50px;
    }

    .welcome-icon i {
        font-size: 1.2rem;
    }

    .brain-animation {
        width: 60px;
        height: 60px;
    }

    .brain-animation i {
        font-size: 1.5rem;
    }

    .input-group-enhanced {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group-enhanced .form-control-enhanced {
        border-radius: 12px;
        border-right: 2px solid rgba(96, 165, 250, 0.3);
    }

    .input-group-enhanced .btn-primary-enhanced {
        border-radius: 12px;
        border-left: 2px solid var(--accent-blue);
    }

    #chatInput {
        padding: 0.75rem;
        min-height: 44px;
    }

    #sendButton {
        padding: 0.75rem 1rem;
        min-height: 44px;
        justify-content: center;
    }

    /* Removed stats grid mobile styles - no longer needed */
}

/* Edit Profile Modal - Compact Version */
.profile-form-enhanced {
    width: 100%;
}

.profile-form-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group-compact {
    margin-bottom: 0;
}

.form-label-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
}

.form-label-compact i {
    color: var(--accent-blue);
    font-size: 0.875rem;
    width: 14px;
}

.form-control-compact {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 100%;
}

.form-control-compact:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
    color: var(--text-primary);
    outline: none;
}

.form-control-compact::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

textarea.form-control-compact {
    resize: vertical;
    min-height: 60px;
    line-height: 1.4;
}

/* Removed stats section styles - no longer needed */

/* Form Validation Styles */
.form-control-enhanced:valid {
    border-color: #22c55e;
}

.form-control-enhanced:invalid {
    border-color: #ef4444;
}

.form-control-enhanced:valid + .form-help {
    color: rgba(34, 197, 94, 0.8);
}

.form-control-enhanced:invalid + .form-help {
    color: rgba(239, 68, 68, 0.8);
}

/* Enhanced Form Focus States */
.form-control-enhanced:focus + .form-help {
    color: var(--accent-blue);
    transform: translateX(5px);
}

/* Quick Action Buttons */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--accent-blue);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

/* Accessibility Enhancements */
.modal-enhanced:focus-within {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 0 3px rgba(96, 165, 250, 0.5);
}

/* Smooth transitions for all interactive elements */
* {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Additional Visual Enhancements */
.modal-enhanced .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.modal-enhanced .alert {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
}