/**
 * AI-SDR Onboarding Workflow Styles
 */

.onboarding-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Progress bar */
.progress-container {
    position: relative;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
    white-space: nowrap;
}

/* Stepper */
.stepper-container {
    padding: 1rem 0;
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

/* ========== ONBOARDING DOCUMENT UPLOAD STYLES ========== */

.document-upload-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.document-upload-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.upload-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.upload-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.upload-header .upload-title h6 {
    margin-bottom: 0.25rem;
    color: #495057;
    font-weight: 600;
}

.upload-body {
    margin-top: 0.75rem;
}

.file-input {
    display: none;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-upload-area:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.file-upload-area .fas {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.upload-text {
    display: block;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.upload-subtext {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
}

.upload-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #e8f4fd;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.upload-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.file-name {
    font-weight: 500;
    color: #495057;
    flex-grow: 1;
    margin-right: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-status {
    margin-top: 0.5rem;
    min-height: 1.5rem;
}

.upload-status .text-info,
.upload-status .text-success,
.upload-status .text-danger {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Document list styles */
.document-list {
    margin-bottom: 1.5rem;
}

.document-list .table {
    margin-bottom: 0;
}

.document-list .table td {
    vertical-align: middle;
}

.document-list .fa-file-pdf {
    font-size: 1.1rem;
}

.remove-document:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .document-upload-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .document-upload-grid {
        grid-template-columns: 1fr;
    }
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background-color: #007bff;
    color: white;
}

.step.completed .step-icon {
    background-color: #28a745;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    max-width: 120px;
}

.step.active .step-label {
    color: #007bff;
    font-weight: 600;
}

.step.completed .step-label {
    color: #28a745;
}

.step-connector {
    flex-grow: 1;
    height: 2px;
    background-color: #e9ecef;
    margin: 0 10px;
    position: relative;
    top: -20px;
    z-index: 0;
}

/* Step content */
.step-content {
    min-height: 400px;
    padding: 2rem 0;
}

.step-form {
    animation: fadeIn 0.3s ease-out;
}

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

/* Upload areas */
.upload-area, .csv-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover, .csv-upload-area:hover,
.upload-area.highlight, .csv-upload-area.highlight {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.upload-icon {
    margin-bottom: 1rem;
}

/* Email connection */
.email-options .card {
    transition: all 0.3s ease;
}

.email-options .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.email-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .onboarding-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        max-width: 80px;
    }
    
    .step-icon {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .stepper {
        flex-wrap: wrap;
    }
    
    .progress-text {
        font-size: 0.75rem;
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Document list */
.document-list {
    margin-top: 2rem;
}

/* CSV preview */
.csv-preview-container {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease-out;
}

/* Disabled step states for linear progression */
.onboarding-step-card.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.onboarding-step-card.disabled .step-icon {
    background-color: #e9ecef !important;
    color: #6c757d !important;
}

.onboarding-step-card.disabled .step-label {
    color: #6c757d !important;
}

/* Link disabled state */
a.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: none;
}

/* Portfolio companies */
.portfolio-company {
    transition: all 0.3s ease;
}

.portfolio-company:hover {
    transform: translateX(2px);
}