/* ===============================================
   JOB MODAL REDESIGN - PROFESSIONAL LAYOUT
   =============================================== */

/* Enhanced Modal Overlay */
.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

/* Enhanced Modal Content */
.modal-content {
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

/* Job Modal Header Redesigned */
.job-modal-header {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 24px 30px;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.job-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.job-modal-header .header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.job-modal-header .modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.job-modal-header .header-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.job-modal-header .modal-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 400;
}

.job-modal-header .close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.job-modal-header .close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Form Sections */
.form-section {
    padding: 30px;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.section-title h4 {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
}

.section-title p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Enhanced Form Groups */
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group label i {
    color: #ef4444;
    width: 16px;
    text-align: center;
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ef4444;
    background: white;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-hint i {
    color: #9ca3af;
}

/* Character Counter */
.character-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 6px;
}

/* Salary Inputs Enhanced */
.salary-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.salary-input-group:focus-within {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.currency-symbol {
    padding: 12px 16px;
    background: #f8fafc;
    color: #6b7280;
    font-weight: 600;
    border-right: 1px solid #e5e7eb;
    border-radius: 6px 0 0 6px;
}

.salary-input-group input {
    border: none;
    background: transparent;
    flex: 1;
    margin: 0;
}

.salary-range {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Requirements Section */
.requirements-grid {
    display: grid;
    gap: 24px;
}

.requirement-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.requirement-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    font-size: 1rem;
}

.requirement-label i {
    color: #ef4444;
    width: 16px;
    text-align: center;
}

.add-requirement {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

.add-requirement:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
}

.add-requirement.optional {
    background: #fef7f7;
    border-color: #f87171;
    color: #b91c1c;
}

.add-requirement.optional:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.add-requirement.benefit {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.add-requirement.benefit:hover {
    background: #fecaca;
    border-color: #dc2626;
}

/* Form Actions Enhanced */
.form-actions {
    padding: 24px 30px;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e7eb;
}

.action-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.9rem;
}

.action-info i {
    color: #ef4444;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.actions-buttons-footer {
    display: flex;
    gap: 12px;
}

.cancel-button {
    width: 182px !important;
    background: #e2e8f0;
    color: #1e293b;
    border: 2px solid #94a3b8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .cancel-button:hover {
    background: #cbd5e1;
    border-color: #64748b;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }  
  
.save-button {
    width: 182px !important;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.save-button:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-section {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .salary-range {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .job-modal-header {
        padding: 20px;
    }
    
    .job-modal-header .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .job-modal-header .header-text h3 {
        justify-content: center;
    }
}

/* ===============================================
   FIXED HEADER AND CUSTOM SCROLLBAR
   =============================================== */

/* Override modal content structure for job modal */
.job-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

/* Fixed header */
.job-modal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    width: 100%;
}

/* Scrollable content area */
.job-form {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Red Scrollbar */
.job-form::-webkit-scrollbar {
    width: 12px;
}

.job-form::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
}

.job-form::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 6px;
    border: 2px solid #f8fafc;
}

.job-form::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.job-form::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}

/* Firefox scrollbar */
.job-form {
    scrollbar-width: thin;
    scrollbar-color: #ef4444 #f8fafc;
}

/* Smooth scrolling */
.job-form {
    scroll-behavior: smooth;
}

/* Shadow effect when scrolling */
.job-modal-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.job-modal-header.scrolled::after {
    opacity: 1;
}

/* Ensure form sections don't stick to header */
.form-section:first-child {
    margin-top: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .job-form::-webkit-scrollbar {
        width: 8px;
    }
    
    .job-form::-webkit-scrollbar-thumb {
        border: 1px solid #f8fafc;
    }
}
