/* ===== Free Classified Job Page Styles ===== */
/* This file is scoped to the Free Classified Job page only */

.ui-autocomplete {
    z-index: 9999;
}

/* ===== Modern Job Post Page ===== */
.fcj-page {
    font-family: 'Inter', 'Roboto', sans-serif;
    padding: 30px 0 60px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fc 50%, #f0f4ff 100%);
    min-height: 80vh;
}

.fcj-page-header {
    margin-bottom: 30px;
}

.fcj-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fcj-page-header h1 .header-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.fcj-page-header p {
    color: #64748b;
    font-size: 15px;
    margin: 8px 0 0 56px;
}

.fcj-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .03);
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow .25s ease;
}

.fcj-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.fcj-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #677889;
    display: flex;
    align-items: center;
    gap: 12px;
    /* background: linear-gradient(to right, #fafbff, #fff); */
    background: linear-gradient(to right, #356bab, #ffffff)
}

.fcj-card-header .card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.fcj-card-header .card-icon.white {
    background: rgba(37, 99, 235, .1);
    color: #ffffff;
}

.fcj-card-header .card-icon.blue {
    background: rgba(37, 99, 235, .1);
    color: #2563eb;
}

.fcj-card-header .card-icon.purple {
    background: rgba(124, 58, 237, .1);
    color: #ffffff;
}

.fcj-card-header .card-icon.green {
    background: rgba(16, 185, 129, .1);
    color: #10b981;
}

.fcj-card-header .card-icon.orange {
    background: rgba(245, 158, 11, .1);
    color: #f59e0b;
}

.fcj-card-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
}

.fcj-card-body {
    padding: 24px;
}

.fcj-form-group {
    margin-bottom: 20px;
}

.fcj-form-group label,
.fcj-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    display: block;
    letter-spacing: .01em;
}

.fcj-label .required {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}

.fcj-form-group .form-control,
.fcj-card .form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: #334155;
    transition: all .2s ease;
    height: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    font-family: 'Inter', sans-serif;
}

.fcj-form-group .form-control:focus,
.fcj-card .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    outline: none;
}

.fcj-form-group .form-control::placeholder {
    color: #94a3b8;
}

.fcj-card select.form-control {
    appearance: auto;
    cursor: pointer;
}

.fcj-card .select2-container--default .select2-selection--single {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    height: 42px;
    padding: 6px 14px;
}

.fcj-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: #334155;
    font-size: 14px;
}

.fcj-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.fcj-note {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.fcj-checkbox-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-top: 8px;
}

.fcj-checkbox-label input[type="checkbox"],
.fcj-checkbox-label input[type="radio"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.fcj-section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 10px 0 20px;
}

.fcj-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
    font-family: 'Inter', sans-serif;
}

.fcj-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, .35);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
}

.fcj-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, .25);
    font-family: 'Inter', sans-serif;
}

.fcj-btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, .35);
    color: #fff;
}

.fcj-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, .25);
    font-family: 'Inter', sans-serif;
}

.fcj-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, .35);
    color: #fff;
}

.fcj-btn-outline {
    background: #fff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
    font-family: 'Inter', sans-serif;
}

.fcj-btn-outline:hover {
    background: #2563eb;
    color: #fff;
}

.fcj-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 10px;
}

.fcj-qual-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-top: 12px;
    table-layout: fixed;
}

.fcj-qual-table thead th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.fcj-qual-table thead th:nth-child(1) {
    width: 25%;
}

.fcj-qual-table thead th:nth-child(2) {
    width: 28%;
}

.fcj-qual-table thead th:nth-child(3) {
    width: 32%;
}

.fcj-qual-table thead th:nth-child(4) {
    width: 15%;
}

.fcj-qual-table tbody td {
    padding: 10px 14px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

/* Multiselect styles */
.fcj-card .multiselect {
    position: relative;
}

.fcj-card .multiselect .overSelect {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 4px;
    min-height: 42px;
    background: #fff;
    cursor: pointer;
}

.fcj-card .multiselect .overSelect ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.fcj-card .multiselect .overSelect ul li {
    display: inline-flex;
    align-items: center;
}

.fcj-card .multiselect .overSelect ul li input[type="text"] {
    border: none !important;
    height: 30px !important;
    box-shadow: none !important;
    padding: 2px 8px !important;
    font-size: 14px;
    min-width: 120px;
}

.fcj-card .multiselect .checkboxes {
    border: 1.5px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
    border-top: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
}

.fcj-card .multiselect .checkboxes label {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: background .15s;
}

.fcj-card .multiselect .checkboxes label:hover {
    background: #f1f5f9;
}

/* Summernote override */
.fcj-card .note-editor {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    overflow: hidden;
}

.fcj-card .note-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* Modal override - SCOPED under .fcj-modal so it does NOT affect other pages */
.fcj-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .18), 0 8px 32px rgba(0, 0, 0, .08);
    overflow: hidden;
    animation: fcjModalSlideIn .35s ease both;
}

@keyframes fcjModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fcj-modal .modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.fcj-modal-header {
    text-align: center;
    padding: 32px 28px 20px;
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 50%, #f0f4ff 100%);
    border-bottom: 1px solid rgba(37, 99, 235, .08);
    position: relative;
}

.fcj-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 24px;
    color: #94a3b8;
    opacity: 1;
    font-weight: 300;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    line-height: 1;
    padding: 0;
    background: rgba(0, 0, 0, .04);
}

.fcj-modal-close:hover {
    background: rgba(239, 68, 68, .1);
    color: #ef4444;
}

.fcj-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .3);
}

.fcj-modal-icon.blue {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 16px rgba(37, 99, 235, .3);
}

.fcj-modal-icon.green {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 16px rgba(16, 185, 129, .3);
}

.fcj-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}

.fcj-modal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

.fcj-modal .modal-body {
    padding: 0;
}

.fcj-modal-body-inner {
    padding: 28px;
}

.fcj-modal .modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 16px 24px;
}

/* Remove button for qualification table */
.fcj-remove-btn {
    cursor: pointer;
    color: #ef4444;
    font-weight: 600;
    font-size: 13px;
    transition: all .2s ease;
    white-space: nowrap;
}

.fcj-remove-btn:hover {
    color: #dc2626;
    text-decoration: none;
}

/* Error text */
.fcj-card .colorRed,
.fcj-card .form-error {
    color: #ef4444 !important;
    font-size: 12px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fcj-card {
    animation: fadeInUp .4s ease both;
}

.fcj-card:nth-child(2) {
    animation-delay: .08s;
}

.fcj-card:nth-child(3) {
    animation-delay: .16s;
}

.fcj-card:nth-child(4) {
    animation-delay: .24s;
}

/* ===== Responsive Styles ===== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .fcj-page .container {
        max-width: 1140px;
    }
}

/* Tablet landscape & small desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .fcj-page .container {
        max-width: 960px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .fcj-page {
        padding: 24px 0 50px;
    }

    .fcj-page-header h1 {
        font-size: 24px;
    }

    .fcj-page-header h1 .header-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .fcj-page-header p {
        margin-left: 50px;
        font-size: 14px;
    }

    .fcj-card-header {
        padding: 14px 20px;
    }

    .fcj-card-body {
        padding: 20px;
    }

    .fcj-card-header h3 {
        font-size: 16px;
    }

    /* Make form fields full width on tablet */
    .fcj-card-body .col-md-6,
    .fcj-card-body .col-md-4,
    .fcj-card-body .col-md-3 {
        width: 100%;
    }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
    .fcj-page {
        padding: 16px 0 40px;
    }

    .fcj-page .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .fcj-page-header {
        margin-bottom: 20px;
    }

    .fcj-page-header h1 {
        font-size: 20px;
        gap: 10px;
    }

    .fcj-page-header h1 .header-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
        border-radius: 10px;
    }

    .fcj-page-header p {
        font-size: 13px;
        margin: 6px 0 0 44px;
    }

    .fcj-card {
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .fcj-card-header {
        padding: 12px 16px;
        gap: 10px;
    }

    .fcj-card-header .card-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 8px;
    }

    .fcj-card-header h3 {
        font-size: 15px;
    }

    .fcj-card-body {
        padding: 16px;
    }

    .fcj-form-group {
        margin-bottom: 16px;
    }

    .fcj-form-group label,
    .fcj-label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .fcj-form-group .form-control,
    .fcj-card .form-control {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .fcj-card .select2-container--default .select2-selection--single {
        height: 38px;
        padding: 4px 12px;
        border-radius: 8px;
    }

    .fcj-card .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 26px;
        font-size: 13px;
    }

    .fcj-card .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px;
    }

    /* Make columns responsive on mobile */
    .fcj-card-body .col-md-6,
    .fcj-card-body .col-md-4,
    .fcj-card-body .col-md-3,
    .fcj-card-body .col-md-2,
    .fcj-card-body .col-md-1 {
        width: 100%;
        float: none;
    }

    .fcj-card-body .col-xs-6 {
        width: 50%;
    }

    .fcj-btn-primary,
    .fcj-btn-success,
    .fcj-btn-danger {
        padding: 8px 20px;
        font-size: 13px;
        border-radius: 8px;
    }

    .fcj-btn-outline {
        padding: 6px 16px;
        font-size: 12px;
        border-radius: 8px;
    }

    .fcj-actions {
        gap: 8px;
    }

    .fcj-qual-table {
        border-radius: 8px;
    }

    .fcj-qual-table thead th,
    .fcj-qual-table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .fcj-card .multiselect .overSelect {
        min-height: 38px;
        border-radius: 8px;
    }

    .fcj-checkbox-label {
        font-size: 12px;
    }

    /* Modal responsive */
    .fcj-modal .modal-dialog {
        margin: 12px;
    }

    .fcj-modal-header {
        padding: 24px 20px 16px;
    }

    .fcj-modal-icon {
        width: 48px;
        height: 48px;
        font-size: 19px;
        border-radius: 14px;
    }

    .fcj-modal-title {
        font-size: 18px;
    }

    .fcj-modal-subtitle {
        font-size: 12px;
    }

    .fcj-modal-body-inner {
        padding: 20px;
    }

    .fcj-modal-close {
        top: 10px;
        right: 12px;
    }

    /* Qualification table: convert to stacked cards on mobile */
    .fcj-qual-table thead {
        display: none;
    }

    .fcj-qual-table tbody tr {
        display: block;
        margin-bottom: 8px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }

    .fcj-qual-table tbody tr#showQualifications {
        border: 1px solid #e2e8f0;
        border-radius: 10px;
    }

    .fcj-qual-table tbody tr#showQualifications td {
        display: block;
    }

    .fcj-qual-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 14px;
        font-size: 13px;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
    }

    .fcj-qual-table tbody td:last-child {
        border-bottom: none;
    }

    .fcj-qual-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #475569;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .03em;
        flex-shrink: 0;
        margin-right: 12px;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .fcj-page-header h1 {
        font-size: 18px;
    }

    .fcj-page-header h1 .header-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        border-radius: 8px;
    }

    .fcj-page-header p {
        font-size: 12px;
        margin: 4px 0 0 40px;
    }

    .fcj-card-header h3 {
        font-size: 14px;
    }

    .fcj-card-body {
        padding: 12px;
    }

    .fcj-card-body .col-xs-6 {
        width: 100%;
    }
}
