/* Upload System - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.hero-features {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: var(--transition);
}

.feature-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Wizard Section */
.wizard-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 70vh;
}

.wizard-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

/* Chat Container */
.chat-container {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Chat Messages */
.chat-message {
    display: flex;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.chat-message.active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease;
}

.chat-message.bot-message {
    justify-content: flex-start;
}

.chat-message.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--gradient-success);
    margin-left: 1rem;
    margin-right: 0;
    order: 2;
}

.message-content {
    max-width: 80%;
    flex-grow: 1;
}

.user-message .message-content {
    order: 1;
}

.message-bubble {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.user-message .message-bubble {
    background: var(--primary-color);
    color: white;
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #f8f9fa transparent transparent;
}

.user-message .message-bubble::before {
    left: auto;
    right: -8px;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--primary-color);
}

.next-step-preview {
    background: rgba(13, 110, 253, 0.1);
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 3px solid var(--primary-color);
    margin-top: 1rem;
}

/* Wizard Forms */
.wizard-form {
    margin-top: 1rem;
}

.wizard-form .input-group {
    box-shadow: var(--shadow-sm);
}

.wizard-form .form-control {
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.wizard-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.wizard-form .input-group-text {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    font-weight: 500;
}

/* Company Card */
.company-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.company-header {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.company-details h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.company-details p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.company-details code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    background: #fafbfc;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.upload-zone.dragover {
    border-color: var(--success-color);
    background: rgba(25, 135, 84, 0.05);
    transform: scale(1.02);
}

.dropzone-container {
    position: relative;
    z-index: 2;
}

.dropzone-content h5 {
    color: var(--dark-color);
    font-weight: 600;
}

.dropzone-content .btn {
    transition: var(--transition);
}

.dropzone-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* File List */
.file-list {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.file-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.file-details h6 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.file-details small {
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-progress {
    margin-top: 0.5rem;
}

.file-progress .progress {
    height: 4px;
    background: #e9ecef;
}

.file-progress .progress-bar {
    transition: width 0.3s ease;
}

/* Terms Section */
.terms-section {
    background: rgba(25, 135, 84, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
}

.terms-section .form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Send Section */
.send-section .btn {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.send-section .btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.send-section .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.success-message .display-4 {
    animation: bounceIn 1s ease;
}

.success-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.success-details .col-md-4 {
    padding: 1rem;
}

.success-details i {
    animation: pulse 2s infinite;
}

/* Progress Steps */
.wizard-progress {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 2rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0.5rem;
    transition: var(--transition);
}

.step i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step span {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    transition: var(--transition);
}

.step.active i {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step.active span {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed i {
    background: var(--success-color);
    color: white;
}

.step.completed span {
    color: var(--success-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.terms-content h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.terms-content h6:first-child {
    margin-top: 0;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .chat-container {
        padding: 1rem;
        max-height: 60vh;
    }
    
    .message-content {
        max-width: 95%;
    }
    
    .wizard-progress {
        padding: 0.75rem 1rem;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step {
        flex: 1;
        min-width: 80px;
    }
    
    .step span {
        font-size: 0.7rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .company-details .row {
        text-align: center;
    }
    
    .success-details .col-md-4 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .feature-item {
        font-size: 0.8rem;
    }
    
    .message-bubble {
        padding: 1rem;
    }
    
    .wizard-form .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Print Styles */
@media print {
    .navbar,
    .wizard-progress,
    .modal,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .chat-container {
        max-height: none !important;
        overflow: visible !important;
    }
}