/**
 * UBD Job Board Styles
 * Design moderne inspiré Indeed/LinkedIn
 */

/* === Progress Bar === */
.ubd-job-progress {
    margin-bottom: 40px;
}

.ubd-job-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ubd-job-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    transition: width 0.4s ease;
}

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

.ubd-job-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.ubd-job-step.active {
    opacity: 1;
}

.ubd-job-step .step-number {
    width: 36px;
    height: 36px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.ubd-job-step.active .step-number {
    background: #2563eb;
    color: white;
}

.ubd-job-step .step-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.ubd-job-step.active .step-label {
    color: #1f2937;
}

/* === Form Container === */
.ubd-job-submit-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ubd-job-form {
    margin-top: 30px;
}

.ubd-job-form-step {
    display: none;
}

.ubd-job-form-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.ubd-job-form-step h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
}

/* === Form Groups === */
.ubd-form-group {
    margin-bottom: 24px;
}

.ubd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ubd-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.ubd-form-group .required {
    color: #ef4444;
}

.ubd-form-group input[type="text"],
.ubd-form-group input[type="email"],
.ubd-form-group input[type="url"],
.ubd-form-group input[type="number"],
.ubd-form-group input[type="date"],
.ubd-form-group select,
.ubd-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.ubd-form-group input:focus,
.ubd-form-group select:focus,
.ubd-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.ubd-form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.ubd-form-group small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
}

/* === Checkbox Groups === */
.ubd-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ubd-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ubd-checkbox-label:hover {
    background: #f9fafb;
    border-color: #2563eb;
}

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

/* === Company Info Box === */
#ubd-company-info {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
}

#ubd-company-info p {
    margin: 6px 0;
    color: #1e40af;
    font-size: 14px;
}

/* === Category Suggestions === */
.ubd-category-suggestion {
    margin-bottom: 16px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
}

.ubd-category-suggestion p {
    margin: 0 0 10px;
    color: #92400e;
    font-weight: 600;
    font-size: 14px;
}

.ubd-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ubd-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #fbbf24;
    color: #78350f;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* === Create Category Box === */
#ubd-create-category-box {
    margin-top: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#ubd-create-category-box input {
    width: calc(100% - 180px);
    margin-right: 8px;
}

/* === Buttons === */
.ubd-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.ubd-btn-primary,
.ubd-btn-secondary,
.ubd-btn-success {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.ubd-btn-primary {
    background: #2563eb;
    color: white;
}

.ubd-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ubd-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.ubd-btn-secondary:hover {
    background: #e5e7eb;
}

.ubd-btn-success {
    background: #10b981;
    color: white;
}

.ubd-btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ubd-btn-primary:disabled,
.ubd-btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === Messages === */
.ubd-message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

.ubd-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.ubd-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* === Job Card Template === */
.ubd-job-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.ubd-job-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.ubd-job-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ubd-job-company-logo {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.ubd-job-card-info {
    flex: 1;
}

.ubd-job-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.ubd-job-company {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 8px;
}

.ubd-job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ubd-job-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.ubd-job-badge.contract {
    background: #dbeafe;
    color: #1e40af;
}

.ubd-job-badge.license {
    background: #fef3c7;
    color: #92400e;
}

.ubd-job-badge.vehicle {
    background: #ddd6fe;
    color: #5b21b6;
}

.ubd-job-badge.location {
    background: #d1fae5;
    color: #065f46;
}

.ubd-job-meta {
    display: flex;
    gap: 20px;
    color: #6b7280;
    font-size: 14px;
    margin-top: 12px;
}

.ubd-job-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ubd-job-salary {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
    margin-top: 12px;
}

.ubd-job-description {
    color: #4b5563;
    line-height: 1.6;
    margin-top: 16px;
}

.ubd-job-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.ubd-job-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.ubd-job-btn-primary {
    background: #2563eb;
    color: white;
}

.ubd-job-btn-primary:hover {
    background: #1d4ed8;
}

.ubd-job-btn-secondary {
    background: white;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.ubd-job-btn-secondary:hover {
    background: #eff6ff;
}

/* === Responsive === */
@media (max-width: 768px) {
    .ubd-job-submit-wrapper {
        padding: 24px;
    }

    .ubd-form-row {
        grid-template-columns: 1fr;
    }

    .ubd-job-progress-steps {
        flex-wrap: wrap;
    }

    .ubd-job-step {
        flex: 1 1 50%;
        margin-bottom: 16px;
    }

    .ubd-checkbox-group {
        grid-template-columns: 1fr;
    }

    .ubd-form-actions {
        flex-direction: column;
    }

    .ubd-form-actions button {
        width: 100%;
    }

    #ubd-create-category-box input {
        width: 100%;
        margin-bottom: 8px;
    }

    .ubd-job-card-header {
        flex-direction: column;
    }

    .ubd-job-company-logo {
        align-self: flex-start;
    }
}

/* === Notice === */
.ubd-job-form-notice {
    padding: 20px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.ubd-job-form-notice a {
    color: #2563eb;
    text-decoration: underline;
}
