/**
 * Crewlink Job Seeker Registration - Frontend Styles
 */

/* Container */
.crewlink-jsr-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.crewlink-jsr-header {
    text-align: center;
    margin-bottom: 40px;
}

.crewlink-jsr-header h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

.crewlink-jsr-header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Progress Bar */
.crewlink-jsr-progress {
    margin-bottom: 40px;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #0052a3);
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-steps .step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-steps .step .step-number {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    background: #e0e0e0;
    color: #95a5a6;
    border-radius: 50%;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.progress-steps .step.active .step-number {
    background: #0066cc;
    color: white;
}

.progress-steps .step.completed .step-number {
    background: #27ae60;
    color: white;
}

.progress-steps .step .step-label {
    display: block;
    font-size: 13px;
    color: #95a5a6;
    transition: color 0.3s;
}

.progress-steps .step.active .step-label,
.progress-steps .step.completed .step-label {
    color: #2c3e50;
    font-weight: 500;
}

/* Form Steps */
#crewlinkRegistrationForm {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.form-step h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 8px;
}

.step-description {
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Form Groups */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group label small {
    color: #95a5a6;
    font-weight: normal;
}

.required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #e74c3c;
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}

/* Job Titles Selection */
.job-titles-selection {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

/* Job Category Selection */
.job-category-select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.job-category-select:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.no-category-selected {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.no-category-selected p {
    color: #7f8c8d;
    font-size: 15px;
    margin: 0;
}

.job-titles-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.job-titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.job-title-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.job-title-item:hover:not(.disabled) {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.job-title-item.selected {
    background: #e3f2fd;
    border-color: #0066cc;
}

.job-title-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.job-title-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.job-title-item.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.job-title-text {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.job-title-item .checkmark {
    display: none;
    color: #0066cc;
    font-weight: bold;
    font-size: 18px;
}

.job-title-item.selected .checkmark {
    display: inline;
}

/* Selected Jobs Summary */
.selected-jobs-summary {
    margin-top: 20px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.summary-header strong {
    color: #27ae60;
    font-size: 15px;
}

.summary-header #selectedCount {
    font-size: 18px;
}

.clear-all-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.clear-all-btn:hover {
    background: #c0392b;
}

.selected-jobs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.job-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-tag .remove-job {
    background: #e74c3c;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.job-tag .remove-job:hover {
    background: #c0392b;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: block;
    padding: 30px;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-label:hover {
    border-color: #0066cc;
    background: #f8f9fa;
}

.file-upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.file-upload-text {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 5px;
}

.file-upload-info {
    display: block;
    color: #95a5a6;
    font-size: 13px;
}

.file-preview {
    margin-top: 10px;
}

.file-info {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.file-name {
    flex: 1;
    color: #2c3e50;
    font-size: 14px;
}

.file-size {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0 10px;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.remove-file:hover {
    background: #c0392b;
}

/* Review Section */
.review-section {
    margin-bottom: 30px;
}

.review-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.review-box h4 {
    color: #0066cc;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.review-item {
    padding: 8px 0;
    color: #2c3e50;
}

.review-item strong {
    display: inline-block;
    min-width: 150px;
    color: #7f8c8d;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    color: #2c3e50;
    line-height: 1.5;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay p {
    margin-top: 20px;
    color: #2c3e50;
    font-size: 16px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 60px 40px;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-in;
    background: #ffffff;
    position: relative;
    z-index: 10;
    display: block;
    clear: both;
}

.success-checkmark {
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease-out;
    display: block;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-title {
    color: #27ae60;
    font-size: 36px;
    font-weight: 700;
    margin: 20px 0 10px 0;
    display: block;
}

.success-subtitle {
    color: #7f8c8d;
    font-size: 18px;
    margin: 0 0 40px 0;
    display: block;
}

.registration-id-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 16px;
    margin: 40px auto;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    display: block;
}

.id-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 600;
}

.registration-id-number {
    font-size: 42px;
    font-weight: bold;
    color: white;
    font-family: 'Courier New', monospace;
    letter-spacing: 8px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.id-warning {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
}

.id-warning svg {
    flex-shrink: 0;
}

.success-actions {
    margin: 40px 0 30px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download-pdf,
.btn-back-home {
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-download-pdf {
    background: #27ae60;
    color: white;
}

.btn-download-pdf:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-back-home {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-back-home:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.email-confirmation-note {
    background: #e8f8f5;
    border-left: 4px solid #3498db;
    padding: 20px;
    border-radius: 8px;
    margin-top: 40px;
    color: #2c3e50;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    clear: both;
}

.email-confirmation-note svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .progress-steps .step .step-label {
        font-size: 11px;
    }
    
    .job-titles-grid {
        grid-template-columns: 1fr;
    }
    
    .selected-jobs-tags {
        flex-direction: column;
    }
    
    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .clear-all-btn {
        width: 100%;
    }
    
    .success-message {
        padding: 40px 20px;
    }
    
    .success-title {
        font-size: 28px;
    }
    
    .registration-id-number {
        font-size: 28px;
        letter-spacing: 4px;
        padding: 20px 15px;
    }
    
    .success-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-download-pdf,
    .btn-back-home {
        width: 100%;
        justify-content: center;
    }
    
    .email-confirmation-note {
        flex-direction: column;
        text-align: center;
    }
}
