/**
 * CT Recruitment Public Styles
 */

/* CSS Custom Property Defaults – overridden by wp_add_inline_style */
:root {
    --ctrec-primary: #3b82f6;
    --ctrec-primary-dark: #1d4ed8;
    --ctrec-primary-hover: #2563eb;
    --ctrec-success: #10b981;
    --ctrec-card-bg: #ffffff;
    --ctrec-card-border: #e2e8f0;
    --ctrec-text: #334155;
    --ctrec-heading: #0f172a;
    --ctrec-h1: 36px;
    --ctrec-h2: 24px;
    --ctrec-h3: 20px;
    --ctrec-h4: 18px;
    --ctrec-h5: 16px;
    --ctrec-h6: 14px;
    --ctrec-heading-weight: 700;
    --ctrec-body-size: 14px;
    --ctrec-label-size: 12px;
    --ctrec-btn-size: 14px;
    --ctrec-card-title: 20px;
    --ctrec-card-title-weight: 600;
    --ctrec-card-radius: 12px;
    --ctrec-btn-radius: 8px;
    --ctrec-input-radius: 8px;
}

/* Reset and Base */
.ctrec-public {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1f2937;
    line-height: 1.6;
    box-sizing: border-box;
}

/* Force hide default WP focus borders/outlines/shadows */
.ctrec-public *:focus,
.ctrec-public *:focus-visible,
.ctrec-public :focus,
.ctrec-public :focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Icons */
.ctrec-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

/* Job List */
.ctrec-public .ctrec-jobs-header {
    text-align: center;
    margin-bottom: 40px;
}

.ctrec-jobs-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.ctrec-jobs-count {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Filter Bar */
.ctrec-public .ctrec-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.ctrec-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ctrec-filter-item {
    position: relative;
}

.ctrec-filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 40px 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    min-width: 160px;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.ctrec-filter-select:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.ctrec-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ctrec-filter-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctrec-filter-sort .ctrec-filter-select {
    min-width: 180px;
}

/* Active Filters */
.ctrec-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #eff6ff;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

.ctrec-active-label {
    font-size: 14px;
    font-weight: 500;
    color: #1d4ed8;
}

.ctrec-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #1e40af;
}

#ctrec-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ctrec-remove-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #dbeafe;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.ctrec-remove-tag:hover {
    background: #3b82f6;
    color: #ffffff;
}

.ctrec-remove-tag i {
    font-size: 14px;
}

.ctrec-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrec-clear-filters:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* No Results */
.ctrec-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fef3c7;
    border-radius: 16px;
    border: 1px solid #fcd34d;
}

.ctrec-no-results i {
    font-size: 48px;
    color: #f59e0b;
    margin-bottom: 16px;
}

.ctrec-no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 8px;
}

.ctrec-no-results p {
    color: #a16207;
    margin: 0;
}

/* Filter Bar Responsive */
@media (max-width: 768px) {
    .ctrec-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ctrec-filter-group {
        flex-direction: column;
    }

    .ctrec-filter-select {
        width: 100%;
        min-width: unset;
    }

    .ctrec-filter-sort {
        width: 100%;
    }

    .ctrec-filter-sort .ctrec-filter-select {
        width: 100%;
        min-width: unset;
    }

    .ctrec-active-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .ctrec-clear-filters {
        margin-left: 0;
        margin-top: 8px;
    }
}

.ctrec-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Job Card */
.ctrec-public .ctrec-job-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ctrec-job-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.ctrec-job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ctrec-employment-type {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ctrec-deadline {
    font-size: 12px;
    color: #6b7280;
}

.ctrec-deadline .urgent {
    color: #dc2626;
    font-weight: 600;
}

.ctrec-deadline .expired {
    color: #6b7280;
    font-weight: 600;
}

.ctrec-deadline.expired {
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
}

.ctrec-job-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.4;
}

.ctrec-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
}

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

.ctrec-job-salary {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
    margin-top: auto;
}

.ctrec-job-apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ctrec-job-apply-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* No Jobs */
.ctrec-no-jobs {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 16px;
}

.ctrec-no-jobs-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.ctrec-no-jobs h3 {
    font-size: 24px;
    color: #374151;
    margin: 0 0 8px;
}

.ctrec-no-jobs p {
    color: #6b7280;
    margin: 0;
}

/* Job Details Page */
.ctrec-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 24px;
}

.ctrec-back-link:hover {
    color: #1d4ed8;
}

.ctrec-public .ctrec-job-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 32px;
}

.ctrec-employment-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ctrec-job-position {
    font-size: 36px;
    font-weight: 700;
    color: #daecff;
    margin: 16px 0 20px;
    line-height: 1.2;
}

.ctrec-job-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.ctrec-job-header-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ctrec-job-header-meta i {
    font-size: 18px;
}

.ctrec-deadline-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 24px;
    font-size: 15px;
}

.ctrec-deadline-banner i {
    font-size: 18px;
}

/* Job Description */
.ctrec-public .ctrec-job-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

@media (max-width: 900px) {
    .ctrec-job-content {
        grid-template-columns: 1fr;
    }
}

.ctrec-job-description h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 20px 0;
}

.ctrec-prose {
    color: #374151;
    font-size: 16px;
    line-height: 1.8;
}

.ctrec-prose h3 {
    font-size: 18px;
    color: #111827;
    margin: 24px 0 12px;
}

.ctrec-prose ul,
.ctrec-prose ol {
    margin: 16px 0;
    padding-left: 24px;
}

.ctrec-prose li {
    margin-bottom: 8px;
}

/* List-style sections (Perks & Benefits, Other Info) — each line on its own row, no bullets */
.ctrec-list-item {
    display: block;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 16px;
    line-height: 1.6;
}

.ctrec-list-item:last-child {
    border-bottom: none;
}

/* Application Form */
.ctrec-application-form-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px;
    position: sticky;
    top: 120px;
    align-self: start;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.ctrec-application-form-container h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px;
}

.ctrec-form-row {
    margin-bottom: 20px;
}

.ctrec-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ctrec-form-row-2 {
        grid-template-columns: 1fr;
    }
}

.ctrec-form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.ctrec-form-group label .required {
    color: #dc2626;
}

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

.ctrec-form-group input:focus,
.ctrec-form-group select:focus,
.ctrec-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ctrec-form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
}

.ctrec-form-group input[type="file"]:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Radio & Checkbox Groups */
.ctrec-radio-group,
.ctrec-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctrec-radio-label,
.ctrec-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    line-height: normal;
}

.ctrec-radio-label input,
.ctrec-checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

/* Custom Questions */
.ctrec-custom-questions {
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
    margin-top: 24px;
}

.ctrec-custom-questions h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px;
}

/* Submit Button */
.ctrec-form-submit {
    margin-top: 24px;
}

.ctrec-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ctrec-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.ctrec-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
#ctrec-form-messages {
    margin-bottom: 20px;
}

.ctrec-public-message {
    padding: 16px 20px;
    border-radius: 10px;
    font-weight: 500;
}

.ctrec-public-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

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

/* Loading State */
.ctrec-submit-btn.loading {
    position: relative;
    color: transparent;
}

.ctrec-submit-btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* =====================================================
   APPLICATION MODAL STYLES
   ===================================================== */

/* Apply Now Card */
.ctrec-application-sidebar {
    position: sticky;
    top: 150px;
    align-self: start;
}

.ctrec-apply-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

.ctrec-apply-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ctrec-apply-card-icon i {
    font-size: 28px;
    color: #ffffff;
}

.ctrec-apply-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.ctrec-apply-card p {
    color: #6b7280;
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.6;
}

.ctrec-apply-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ctrec-apply-now-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.ctrec-apply-now-btn i {
    font-size: 20px;
}

/* Modal Overlay */
.ctrec-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ctrec-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.ctrec-modal-container {
    position: relative;
    width: 100%;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@media (min-width: 768px) {
    .ctrec-modal-container {
        max-width: 680px;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

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

.ctrec-modal-content {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* Modal Header */
.ctrec-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.ctrec-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.ctrec-modal-title i {
    color: #3b82f6;
    font-size: 22px;
}

.ctrec-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrec-modal-close:hover {
    background: #e5e7eb;
}

.ctrec-modal-close i {
    font-size: 24px;
    color: #6b7280;
}

/* Steps Progress */
.ctrec-steps-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.ctrec-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ctrec-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.ctrec-step.active .ctrec-step-circle {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ctrec-step.completed .ctrec-step-circle {
    background: #10b981;
    color: #ffffff;
}

.ctrec-step.completed .ctrec-step-circle span {
    display: none;
}

.ctrec-step.completed .ctrec-step-circle::after {
    content: '✓';
}

.ctrec-step-label {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    transition: color 0.3s;
}

.ctrec-step.active .ctrec-step-label,
.ctrec-step.completed .ctrec-step-label {
    color: #374151;
}

.ctrec-step-line {
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.ctrec-step-line.completed {
    background: #10b981;
}

/* Modal Body */
.ctrec-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Form Steps */
.ctrec-form-step {
    display: none;
    animation: stepFadeIn 0.4s ease;
}

.ctrec-form-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.ctrec-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}

.ctrec-step-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin: 0 0 24px;
}

/* No Questions Message */
.ctrec-no-questions {
    text-align: center;
    padding: 40px 20px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}

.ctrec-no-questions i {
    font-size: 48px;
    color: #22c55e;
    margin-bottom: 12px;
}

.ctrec-no-questions p {
    color: #166534;
    margin: 0;
}

/* File Upload Area */
.ctrec-file-upload-area {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.3s ease;
    overflow: hidden;
}

.ctrec-file-upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ctrec-file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

/* Empty state label */
.ctrec-file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    text-align: center;
    gap: 6px;
    pointer-events: none;
}

.ctrec-file-upload-label i.bx-cloud-upload {
    font-size: 40px;
    color: #9ca3af;
    margin-bottom: 4px;
    transition: color 0.2s, transform 0.2s;
}

.ctrec-file-upload-area:hover .ctrec-file-upload-label i.bx-cloud-upload {
    color: #3b82f6;
    transform: translateY(-2px);
}

.ctrec-file-text {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.ctrec-file-hint {
    color: #9ca3af;
    font-size: 12px;
}

.ctrec-file-name {
    display: none;
}

/* ===== Has-File State ===== */
.ctrec-file-upload-area.has-file {
    border-style: solid;
    border-color: #10b981;
    background: #f0fdf4;
    padding: 0;
}

.ctrec-file-upload-area.has-file:hover {
    background: #ecfdf5;
    border-color: #059669;
}

.ctrec-file-upload-area.has-file .ctrec-file-upload-label {
    display: none;
}

.ctrec-file-upload-area.has-file input[type="file"] {
    display: none;
}

.ctrec-file-upload-area.has-file .ctrec-file-name {
    display: none;
}

/* File Preview Card (injected by JS) */
.ctrec-file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    position: relative;
    z-index: 3;
}

.ctrec-file-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #fee2e2;
    border-radius: 10px;
    color: #dc2626;
    font-size: 22px;
}

.ctrec-file-preview-info {
    flex: 1;
    min-width: 0;
}

.ctrec-file-preview-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ctrec-file-preview-size {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.ctrec-file-preview-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #059669;
    font-weight: 500;
    margin-top: 2px;
}

.ctrec-file-preview-status i {
    font-size: 14px;
}

.ctrec-file-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    margin: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.ctrec-file-remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.ctrec-file-remove i {
    font-size: 18px;
    line-height: 1;
}

/* Modal Footer */
.ctrec-modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.ctrec-btn-prev,
.ctrec-btn-next,
.ctrec-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ctrec-btn-prev {
    background: #e5e7eb;
    color: #374151;
}

.ctrec-btn-prev:hover {
    background: #d1d5db;
}

.ctrec-btn-next {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    margin-left: auto;
}

.ctrec-btn-next:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ctrec-btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    margin-left: auto;
    border-radius: 12px !important;
}

.ctrec-btn-submit:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ctrec-btn-submit.loading {
    pointer-events: none;
    opacity: 0.75;
    cursor: wait;
    transform: scale(0.98);
    transition: all 0.2s ease;
}

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

.ctrec-btn-submit.loading i {
    animation: spin-rotate 0.8s linear infinite;
    display: inline-block;
}

/* Thank You Screen */
.ctrec-thank-you {
    text-align: center;
    padding: 40px 20px;
}

.ctrec-success-animation {
    margin-bottom: 24px;
}

.ctrec-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ctrec-success-checkmark i {
    font-size: 40px;
    color: #ffffff;
}

.ctrec-thank-you h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.ctrec-thank-you p {
    color: #6b7280;
    font-size: 16px;
    margin: 0 0 12px;
}

.ctrec-thank-you .ctrec-success-message {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 24px;
}

.ctrec-btn-close-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrec-btn-close-modal:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

/* Form Group with Icons */
.ctrec-form-group label i {
    margin-right: 6px;
    color: #6b7280;
    vertical-align: middle;
    font-size: 16px;
    line-height: 1;
}

/* Job Header Meta Icons */
.ctrec-job-header-meta span i {
    margin-right: 4px;
}

.ctrec-deadline-banner i {
    margin-right: 8px;
}




/* File Upload Enhancements */
.ctrec-file-upload-area.dragover {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: scale(1.01);
}

/* Search Input for Job Board */
.ctrec-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.ctrec-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s;
}

.ctrec-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ctrec-search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    pointer-events: none;
}

.ctrec-search-input:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* =====================================================
   COMPREHENSIVE RESPONSIVE STYLES
   ===================================================== */

/* ---------- Tablet (max-width: 900px) ---------- */
@media (max-width: 900px) {

    /* Job detail page: stack sidebar below content */
    .ctrec-public .ctrec-job-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ctrec-application-sidebar {
        position: static;
    }

    .ctrec-application-form-container {
        position: static;
    }

    /* Job detail header */
    .ctrec-public .ctrec-job-header {
        padding: 28px 24px;
    }

    .ctrec-job-position {
        font-size: 28px;
    }

    .ctrec-job-header-meta {
        gap: 12px;
        font-size: 14px;
    }
}

/* ---------- Mobile (max-width: 640px) ---------- */
@media (max-width: 640px) {

    /* Base spacing */
    .ctrec-public {
        padding: 0 4px;
    }

    /* Jobs listing header */
    .ctrec-jobs-title {
        font-size: 24px;
    }

    .ctrec-jobs-count {
        font-size: 14px;
    }

    /* Job grid: single column */
    .ctrec-jobs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Job card */
    .ctrec-public .ctrec-job-card {
        padding: 18px;
        border-radius: 12px;
    }

    .ctrec-job-title {
        font-size: 17px;
    }

    .ctrec-job-meta {
        gap: 10px;
        font-size: 13px;
    }

    .ctrec-job-salary {
        font-size: 15px;
    }

    .ctrec-job-apply-btn {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* Job detail header */
    .ctrec-public .ctrec-job-header {
        padding: 20px 16px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .ctrec-job-position {
        font-size: 22px;
        margin: 12px 0 16px;
    }

    .ctrec-job-header-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }

    .ctrec-deadline-banner {
        padding: 10px 14px;
        font-size: 13px;
        margin-top: 16px;
    }

    /* Job description prose */
    .ctrec-job-description h2 {
        font-size: 20px;
        margin: 16px 0;
    }

    .ctrec-prose {
        font-size: 15px;
    }

    /* Apply card */
    .ctrec-apply-card {
        padding: 24px 16px;
        border-radius: 14px;
    }

    .ctrec-apply-card h3 {
        font-size: 18px;
    }

    .ctrec-apply-card p {
        font-size: 14px;
    }

    .ctrec-apply-now-btn {
        padding: 14px 24px;
        font-size: 15px;
    }

    /* Application form container (non-modal) */
    .ctrec-application-form-container {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .ctrec-application-form-container h2 {
        font-size: 20px;
    }

    /* Modal tweaks */
    .ctrec-modal {
        padding: 0;
    }

    .ctrec-modal-container {
        max-width: 100vw;
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }

    .ctrec-modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
    }

    .ctrec-modal-header {
        padding: 16px;
    }

    .ctrec-modal-title {
        font-size: 15px;
        gap: 8px;
    }

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

    .ctrec-modal-body {
        padding: 16px;
    }

    .ctrec-steps-progress {
        padding: 14px 12px;
    }

    .ctrec-step-circle {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .ctrec-step-label {
        font-size: 10px;
    }

    .ctrec-step-line {
        width: 28px;
        margin: 0 4px;
        margin-bottom: 20px;
    }

    /* Form step titles */
    .ctrec-step-title {
        font-size: 18px;
    }

    .ctrec-step-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    /* Form inputs */
    .ctrec-form-group input[type="text"],
    .ctrec-form-group input[type="email"],
    .ctrec-form-group input[type="tel"],
    .ctrec-form-group input[type="number"],
    .ctrec-form-group input[type="date"],
    .ctrec-form-group select,
    .ctrec-form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .ctrec-form-group label {
        font-size: 13px;
    }

    /* 2-column form rows to single column */
    .ctrec-form-row-2 {
        grid-template-columns: 1fr;
    }

    /* File upload */
    .ctrec-file-upload-label {
        padding: 24px 16px;
    }

    .ctrec-file-upload-label i.bx-cloud-upload {
        font-size: 32px;
    }

    .ctrec-file-text {
        font-size: 13px;
    }

    /* Modal footer */
    .ctrec-modal-footer {
        padding: 14px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .ctrec-btn-prev,
    .ctrec-btn-next,
    .ctrec-btn-submit {
        flex: 1;
        justify-content: center;
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Thank you screen */
    .ctrec-thank-you {
        padding: 30px 16px;
    }

    .ctrec-thank-you h2 {
        font-size: 22px;
    }

    .ctrec-thank-you p {
        font-size: 14px;
    }

    .ctrec-success-checkmark {
        width: 64px;
        height: 64px;
    }

    .ctrec-success-checkmark i {
        font-size: 32px;
    }

    /* Filter bar */
    .ctrec-filter-bar {
        padding: 14px;
        border-radius: 12px;
        gap: 12px;
    }

    .ctrec-search-wrapper {
        min-width: 100%;
    }

    .ctrec-search-input {
        font-size: 14px;
    }

    /* No results / no jobs */
    .ctrec-no-results,
    .ctrec-no-jobs {
        padding: 40px 16px;
    }

    .ctrec-no-jobs-icon {
        font-size: 48px;
    }

    .ctrec-no-jobs h3 {
        font-size: 20px;
    }
}

/* ---------- Small Mobile (max-width: 380px) ---------- */
@media (max-width: 380px) {

    .ctrec-step-label {
        display: none;
    }

    .ctrec-step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .ctrec-step-line {
        width: 20px;
        margin: 0 2px;
        margin-bottom: 0;
    }

    .ctrec-modal-title {
        font-size: 14px;
    }

    .ctrec-step-title {
        font-size: 16px;
    }

    .ctrec-btn-prev,
    .ctrec-btn-next,
    .ctrec-btn-submit {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ctrec-job-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .ctrec-job-position {
        font-size: 20px;
    }

    .ctrec-file-preview {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ctrec-file-preview-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 18px;
    }
}

/* ===== CSS Custom Property Overrides ===== */
/* Connects frontend elements to admin Style tab settings */

/* Colors – Primary */
.ctrec-filter-select:focus,
.ctrec-search-field:focus {
    border-color: var(--ctrec-primary);
}

.ctrec-jobs-grid .ctrec-view-btn,
.ctrec-btn-primary,
.ctrec-detail-apply-btn,
.ctrec-form-submit,
.ctrec-submit-btn {
    background: linear-gradient(135deg, var(--ctrec-primary) 0%, var(--ctrec-primary-dark) 100%);
}

.ctrec-jobs-grid .ctrec-view-btn:hover,
.ctrec-btn-primary:hover,
.ctrec-detail-apply-btn:hover,
.ctrec-form-submit:hover,
.ctrec-submit-btn:hover {
    background: linear-gradient(135deg, var(--ctrec-primary-hover) 0%, var(--ctrec-primary-dark) 100%);
}

.ctrec-btn-outline {
    border-color: var(--ctrec-primary);
    color: var(--ctrec-primary);
}

.ctrec-btn-outline:hover {
    background: var(--ctrec-primary);
}

.ctrec-detail-meta-value a,
.ctrec-job-title a,
.ctrec-detail-title {
    color: var(--ctrec-heading);
}

.ctrec-checkbox input[type="checkbox"]:checked,
.ctrec-radio input[type="radio"]:checked {
    accent-color: var(--ctrec-primary);
}

.ctrec-detail-apply-section .ctrec-detail-apply-btn,
.ctrec-form-submit,
.ctrec-pagination .ctrec-page-link.active {
    background: linear-gradient(135deg, var(--ctrec-primary) 0%, var(--ctrec-primary-dark) 100%);
}

/* Colors – Success */
.ctrec-status-badge.active,
.ctrec-step-indicator.completed {
    background: var(--ctrec-success);
}

.ctrec-success-icon {
    background: linear-gradient(135deg, var(--ctrec-success) 0%, #059669 100%);
}

/* Colors – Text & Headings */
.ctrec-public {
    color: var(--ctrec-text);
    font-size: var(--ctrec-body-size);
}

.ctrec-jobs-title,
.ctrec-detail-title,
.ctrec-form-title {
    color: var(--ctrec-heading);
    font-weight: var(--ctrec-heading-weight);
}

/* Typography – Headings */
.ctrec-detail-title,
.ctrec-public h1 {
    font-size: var(--ctrec-h1);
}

.ctrec-public h2 {
    font-size: var(--ctrec-h2);
}

.ctrec-public h3 {
    font-size: var(--ctrec-h3);
}

.ctrec-public h4 {
    font-size: var(--ctrec-h4);
}

.ctrec-public h5 {
    font-size: var(--ctrec-h5);
}

.ctrec-public h6 {
    font-size: var(--ctrec-h6);
}

/* Typography – Card Title */
.ctrec-job-title,
.ctrec-job-title a {
    font-size: var(--ctrec-card-title);
    font-weight: var(--ctrec-card-title-weight);
}

/* Typography – Labels & Meta */
.ctrec-job-meta span,
.ctrec-detail-meta-label,
.ctrec-form-label {
    font-size: var(--ctrec-label-size);
}

/* Typography – Buttons */
.ctrec-btn-primary,
.ctrec-btn-outline,
.ctrec-view-btn,
.ctrec-detail-apply-btn,
.ctrec-form-submit,
.ctrec-submit-btn {
    font-size: var(--ctrec-btn-size);
    border-radius: var(--ctrec-btn-radius);
}

/* Layout – Card Radius */
.ctrec-job-card,
.ctrec-detail-card,
.ctrec-form-card {
    border-radius: var(--ctrec-card-radius);
    background: var(--ctrec-card-bg);
    border-color: var(--ctrec-card-border);
}

/* Layout – Input Radius */
.ctrec-filter-select,
.ctrec-search-field,
.ctrec-form-input,
.ctrec-form-select,
.ctrec-form-textarea {
    border-radius: var(--ctrec-input-radius);
}