/* Jobs Table Styles - Dark Theme Compatible */

.jobs-container {
    padding: 2rem 0;
}

.jobs-header {
    margin-bottom: 2rem;
}

/* Override Bootstrap card styles for dark theme */
.jobs-container .card,
.container .card {
    background-color: rgba(30, 28, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.jobs-container .card-header,
.container .card-header {
    background-color: rgba(40, 38, 55, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
}

.jobs-container .card-body,
.container .card-body {
    color: #e2e8f0;
}

.jobs-container .card-footer,
.container .card-footer {
    background-color: rgba(40, 38, 55, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form controls dark theme */
.jobs-container .form-control,
.jobs-container .form-select,
.container .form-control,
.container .form-select {
    background-color: rgba(20, 18, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    height: calc(2.5rem + 2px); /* Consistent height with buttons */
    padding: 0.5rem 0.75rem;
}

.jobs-container .form-control:focus,
.jobs-container .form-select:focus,
.container .form-control:focus,
.container .form-select:focus {
    background-color: rgba(25, 23, 35, 0.95);
    border-color: rgba(99, 102, 241, 0.5);
    color: #f5f5f5;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

/* Ensure buttons match form control height */
.jobs-container .btn,
.container .card-body .btn {
    height: calc(2.5rem + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}

/* Fix for button groups in filter form */
.jobs-container .d-flex.gap-2 .btn {
    height: calc(2.5rem + 2px);
}

.jobs-container .form-control::placeholder,
.container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.jobs-container .form-label,
.container .form-label {
    color: #e2e8f0;
}

.jobs-container .form-text,
.container .form-text {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Breadcrumb dark theme */
.breadcrumb {
    background-color: transparent;
}

.breadcrumb-item a {
    color: #a78bfa;
}

.breadcrumb-item a:hover {
    color: #c4b5fd;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* List group dark theme */
.list-group-item {
    background-color: rgba(30, 28, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.list-group-item a {
    color: #a78bfa;
}

.list-group-item a:hover {
    color: #c4b5fd;
}

/* Text colors for dark theme */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Background light override for dark theme */
.bg-light {
    background-color: rgba(40, 38, 55, 0.95) !important;
    color: #e2e8f0;
}

.jobs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(30, 28, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.jobs-table thead {
    background-color: rgba(40, 38, 55, 0.95);
}

.jobs-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #a78bfa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jobs-table td {
    padding: 16px;
    vertical-align: middle;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.jobs-table tr:last-child td {
    border-bottom: none;
}

.jobs-table tr.job-row {
    transition: all 0.2s ease;
}

.jobs-table tr.job-row:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.job-title {
    font-weight: 600;
    font-size: 16px;
    color: #f5f5f5;
    display: block;
    margin-bottom: 4px;
    text-decoration: none;
}

.job-title:hover {
    color: #a78bfa;
}

.job-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.job-type-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    text-align: center;
    white-space: nowrap;
}

.job-type-full-time {
    background-color: rgba(49, 130, 206, 0.2);
    color: #63b3ed;
}

.job-type-part-time {
    background-color: rgba(56, 161, 105, 0.2);
    color: #68d391;
}

.job-type-contract {
    background-color: rgba(128, 90, 213, 0.2);
    color: #b794f4;
}

.job-type-freelance {
    background-color: rgba(221, 107, 32, 0.2);
    color: #f6ad55;
}

.job-type-internship {
    background-color: rgba(229, 62, 62, 0.2);
    color: #fc8181;
}

.job-location {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.job-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Job description content in detail page */
.job-description,
.job-requirements,
.job-benefits {
    color: #e2e8f0;
    line-height: 1.7;
}

.job-description p,
.job-requirements p,
.job-benefits p {
    margin-bottom: 1rem;
    color: #e2e8f0;
}

/* Pagination dark theme */
.pagination .page-link {
    background-color: rgba(30, 28, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #a78bfa;
}

.pagination .page-link:hover {
    background-color: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    color: #c4b5fd;
}

.pagination .page-item.disabled .page-link {
    background-color: rgba(30, 28, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}

.pagination .page-item.active .page-link {
    background-color: rgba(99, 102, 241, 0.8);
    border-color: rgba(99, 102, 241, 0.8);
    color: #fff;
}

/* Buttons */
.btn-outline-primary {
    color: #a78bfa;
    border-color: #a78bfa;
}

.btn-outline-primary:hover {
    background-color: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    border-color: #a78bfa;
}

.btn-outline-secondary {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Headings in container */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
.jobs-container h1,
.jobs-container h2,
.jobs-container h3,
.jobs-container h4,
.jobs-container h5,
.jobs-container h6 {
    color: #f5f5f5;
}

/* Strong text */
.container strong,
.jobs-container strong {
    color: #f5f5f5;
}

/* Paragraph text */
.container p,
.jobs-container p {
    color: #e2e8f0;
}

/* Lead text */
.lead {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* HR styling */
hr {
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jobs-table thead {
        display: none;
    }
    
    .jobs-table, 
    .jobs-table tbody, 
    .jobs-table tr, 
    .jobs-table td {
        display: block;
        width: 100%;
    }
    
    .jobs-table tr {
        margin-bottom: 15px;
        padding: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .jobs-table td {
        padding: 8px 15px;
        text-align: right;
        position: relative;
        padding-left: 40%;
        border-bottom: none;
    }
    
    .jobs-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 35%;
        white-space: nowrap;
        font-weight: 600;
        text-align: left;
        color: rgba(255, 255, 255, 0.6);
    }
    
    .jobs-table td:first-child {
        padding-left: 15px;
        text-align: left;
    }
}

/* ========================================
   Job Detail Page Styles
   ======================================== */

.job-detail-card {
    background: rgba(30, 30, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.job-detail-card .card-body {
    color: #f5f5f5;
}

.job-detail-card h1,
.job-detail-card h4 {
    color: #ffffff;
}

.job-detail-card .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.job-detail-card hr {
    border-color: rgba(255, 255, 255, 0.15);
}

.job-detail-card .job-description,
.job-detail-card .job-requirements,
.job-detail-card .job-benefits {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

/* Primary button with gradient */
.job-detail-card .btn-primary,
.btn-apply {
    background: linear-gradient(135deg, #7c4dff 0%, #536dfe 100%);
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.job-detail-card .btn-primary:hover,
.btn-apply:hover {
    background: linear-gradient(135deg, #651fff 0%, #304ffe 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 77, 255, 0.4);
}

/* Success badge gradient */
.job-detail-card .badge.bg-success {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%) !important;
}

/* ========================================
   Job Apply Page Styles
   ======================================== */

.job-apply-header {
    background: rgba(40, 38, 55, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.job-apply-header h2 {
    color: #ffffff;
}

.text-accent {
    color: #a78bfa !important;
}

.section-title {
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Crispy forms dark theme overrides */
.job-detail-card label,
.job-detail-card .form-label {
    color: #e2e8f0;
    font-weight: 500;
}

.job-detail-card .form-control,
.job-detail-card .form-select {
    background-color: rgba(20, 18, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f5f5f5;
    transition: all 0.2s ease;
}

.job-detail-card .form-control:focus,
.job-detail-card .form-select:focus {
    background-color: rgba(25, 23, 35, 0.95);
    border-color: rgba(124, 77, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(124, 77, 255, 0.25);
}

.job-detail-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.job-detail-card textarea.form-control {
    min-height: 120px;
}

/* File input styling */
.job-detail-card input[type="file"] {
    background-color: rgba(20, 18, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.job-detail-card input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #7c4dff 0%, #536dfe 100%);
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    margin-right: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.job-detail-card input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #651fff 0%, #304ffe 100%);
}

/* Form text/help text */
.job-detail-card .form-text {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Error messages */
.job-detail-card .invalid-feedback,
.job-detail-card .errorlist {
    color: #fc8181;
}

.job-detail-card .is-invalid {
    border-color: #fc8181 !important;
}

/* Asterisk for required fields */
.job-detail-card .asteriskField {
    color: #fc8181;
}

/* ========================================
   Action Buttons for My Applications
   ======================================== */

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.action-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px !important;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s ease;
    height: auto !important;
}

.action-buttons .action-form {
    display: inline-flex;
    margin: 0;
}

.action-buttons .action-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px !important;
    font-size: 13px;
    border-radius: 6px;
    height: auto !important;
}

.action-buttons .btn-outline-secondary {
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    background-color: transparent;
}

.action-buttons .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.action-buttons .btn-outline-primary {
    color: #a78bfa;
    border: 1px solid #a78bfa !important;
    background-color: transparent;
}

.action-buttons .btn-outline-primary:hover {
    background-color: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    border-color: #a78bfa !important;
}

.action-buttons .btn-outline-danger {
    color: #fc8181;
    border: 1px solid #fc8181 !important;
    background-color: transparent;
}

.action-buttons .btn-outline-danger:hover {
    background-color: rgba(252, 129, 129, 0.2);
    color: #feb2b2;
    border-color: #fc8181 !important;
}

.action-buttons .btn-outline-success {
    color: #68d391;
    border: 1px solid #68d391 !important;
    background-color: transparent;
}

.action-buttons .btn-outline-success:hover {
    background-color: rgba(104, 211, 145, 0.2);
    color: #9ae6b4;
    border-color: #68d391 !important;
}

@media (max-width: 768px) {
    .action-buttons {
        justify-content: flex-end;
    }
}

/* Profile Edit Form Styles */
.profile-form-card {
    border-radius: 12px;
    overflow: hidden;
}

.profile-form-card .card-header {
    padding: 1.25rem 1.5rem;
}

.profile-form-card .card-header h5 {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.profile-form-card .card-body {
    padding: 1.5rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

.form-section-title {
    color: #a78bfa;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Controls Enhancement */
.form-section .form-control,
.form-section .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-section textarea.form-control {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.form-section .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.form-section .form-text {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

/* Current File Badge */
.current-file-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    color: #86efac;
    font-size: 0.9rem;
    width: fit-content;
}

.current-file-badge i {
    font-size: 1.2rem;
}

.current-file-badge .btn {
    height: auto !important;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* File Upload Styling */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    background-color: rgba(20, 18, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    width: 100%;
    cursor: pointer;
    height: auto !important;
}

.file-upload-wrapper input[type="file"]:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.file-upload-wrapper input[type="file"]:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
    outline: none;
}

.file-upload-wrapper input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.file-upload-wrapper input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #7c7ff7 0%, #a78bfa 100%);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-actions .btn-lg {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    height: auto !important;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #7c7ff7 0%, #a78bfa 100%);
    transform: translateY(-1px);
}

/* Tips Card */
.tips-card {
    border-radius: 12px;
    position: sticky;
    top: 2rem;
}

.tips-card .card-header {
    padding: 1rem 1.25rem;
}

.tips-card .card-header h6 {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #fbbf24;
}

.tips-card .card-body {
    padding: 1.25rem;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tips-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tips-list li i {
    flex-shrink: 0;
    margin-top: 2px;
}

.tips-list li span {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

@media (max-width: 991px) {
    .tips-card {
        position: static;
        margin-top: 2rem;
    }
}
