/**
 * WP Smart Recruitment - Frontend Stylesheet
 * Giao diện tối giản, tinh tế, sử dụng font hệ thống và SVG icons
 */

:root {
    --rec-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --rec-bg: #ffffff;
    --rec-bg-subtle: #f9fafb;
    --rec-bg-muted: #f3f4f6;
    --rec-border: #e5e7eb;
    --rec-border-hover: #d1d5db;
    --rec-text-main: #111827;
    --rec-text-muted: #6b7280;
    --rec-text-subtle: #9ca3af;
    --rec-primary: #1e3a8a;
    --rec-primary-hover: #172554;
    --rec-radius: 8px;
    --rec-radius-sm: 6px;
    --rec-radius-lg: 12px;
}

/* Base Container & Reset */
.recruitment-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: var(--rec-font-family);
    color: var(--rec-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.recruitment-container *,
.recruitment-modal * {
    box-sizing: border-box;
    font-family: var(--rec-font-family);
}

/* SVG Icons Helper */
.rec-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* --- Hero Banner (Archive & Single) --- */
.recruitment-archive-hero,
.recruitment-job-hero {
    background: #0f172a;
    color: #ffffff;
    padding: 44px 0 50px 0;
    margin-bottom: 36px;
}

.recruitment-archive-hero .sub-heading {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 12px;
}

.recruitment-archive-hero .archive-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.recruitment-archive-hero .archive-description {
    font-size: 15px;
    color: #94a3b8;
    max-width: 640px;
    line-height: 1.6;
    margin: 0;
}

/* Breadcrumbs */
.recruitment-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 18px;
}

.recruitment-breadcrumbs a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.recruitment-breadcrumbs a:hover {
    color: #ffffff;
}

.recruitment-breadcrumbs .current {
    color: #cbd5e1;
    font-weight: 500;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--rec-radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.hero-tag.tag-featured {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-tag.tag-dept {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-tag.tag-type {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-title {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.hero-quick-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #94a3b8;
}

.hero-quick-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-quick-meta .meta-item strong {
    color: #ffffff;
}

.hero-icon {
    color: #64748b;
}

/* --- Filter Bar --- */
.recruitment-filter-wrapper {
    background: #ffffff;
    padding: 16px;
    border-radius: var(--rec-radius-lg);
    border: 1px solid var(--rec-border);
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.recruitment-filter-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr auto;
    gap: 10px;
    align-items: center;
}

.filter-col {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-icon {
    position: absolute;
    left: 12px;
    color: var(--rec-text-subtle);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.filter-col input,
.filter-col select {
    width: 100%;
    padding: 9px 12px 9px 36px;
    font-size: 14px;
    border: 1px solid var(--rec-border);
    border-radius: var(--rec-radius-sm);
    background: #ffffff;
    color: var(--rec-text-main);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: 40px;
    line-height: normal;
}

.filter-col input::placeholder {
    color: var(--rec-text-subtle);
}

.filter-col input:focus,
.filter-col select:focus {
    border-color: #4b5563;
    box-shadow: 0 0 0 1px #4b5563;
}

.filter-col-submit {
    display: flex;
    gap: 6px;
    align-items: center;
}

.recruitment-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--rec-radius-sm);
    background: var(--rec-bg-subtle);
    border: 1px solid var(--rec-border);
    color: var(--rec-text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
}

.recruitment-btn-reset:hover {
    background: #f1f5f9;
    color: var(--rec-text-main);
    border-color: var(--rec-border-hover);
}

/* --- Job Grid & Card --- */
.recruitment-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.recruitment-job-card,
.recruitment-job-card.featured-job,
.featured-job {
    background: #ffffff;
    border: 1px solid var(--rec-border) !important;
    border-left: 1px solid var(--rec-border) !important;
    border-radius: var(--rec-radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.recruitment-job-card:hover,
.recruitment-job-card.featured-job:hover,
.featured-job:hover {
    border-color: var(--rec-border-hover) !important;
    border-left-color: var(--rec-border-hover) !important;
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.06);
}

.job-card-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.job-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--rec-bg-muted);
    color: #4b5563;
    border: 1px solid #e5e7eb;
    letter-spacing: 0.02em;
}

.badge-featured-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.job-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.job-card-title a {
    color: var(--rec-text-main);
    text-decoration: none;
    transition: color 0.15s ease;
}

.job-card-title a:hover {
    color: #2563eb;
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--rec-text-muted);
    margin-bottom: 14px;
}

.job-card-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.job-card-meta .meta-icon {
    color: var(--rec-text-subtle);
}

.job-card-excerpt {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
}

.job-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    gap: 10px;
}

.job-salary {
    display: flex;
    flex-direction: column;
}

.salary-label {
    font-size: 11px;
    color: var(--rec-text-subtle);
    font-weight: 500;
}

.salary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--rec-text-main);
}

.job-actions {
    display: flex;
    gap: 8px;
}

/* --- Buttons --- */
.recruitment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--rec-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}

.recruitment-btn-primary {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.recruitment-btn-primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

.recruitment-btn-outline {
    background: #ffffff;
    color: #374151;
    border-color: var(--rec-border);
}

.recruitment-btn-outline:hover {
    background: var(--rec-bg-subtle);
    border-color: var(--rec-border-hover);
    color: var(--rec-text-main);
}

.recruitment-btn-block {
    width: 100%;
}

/* --- Single Job Page Layout --- */
.recruitment-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    margin-bottom: 50px;
}

.recruitment-content-card {
    background: #ffffff;
    border: 1px solid var(--rec-border);
    border-radius: var(--rec-radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--rec-text-main);
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    letter-spacing: -0.01em;
}

.section-title .section-icon {
    color: var(--rec-text-muted);
}

.section-subtitle {
    font-size: 14px;
    color: var(--rec-text-muted);
    margin: -8px 0 20px 0;
}

.job-rich-description {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
}

.job-rich-description h3,
.job-rich-description h4 {
    color: var(--rec-text-main);
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
}

.job-rich-description ul,
.job-rich-description ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.job-rich-description li {
    margin-bottom: 6px;
}

.job-benefits-box {
    margin-top: 24px;
    padding: 18px 20px;
    background: var(--rec-bg-subtle);
    border-radius: var(--rec-radius);
    border: 1px solid var(--rec-border);
}

.benefits-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--rec-text-main);
    margin: 0 0 10px 0;
}

.benefits-title .benefits-icon {
    color: var(--rec-text-muted);
}

.benefits-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.65;
}

/* Sidebar Widget */
.recruitment-sidebar-card {
    background: #ffffff;
    border: 1px solid var(--rec-border);
    border-radius: var(--rec-radius-lg);
    padding: 22px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--rec-text-main);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

.overview-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.overview-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.overview-list li:last-child {
    border-bottom: none;
}

.overview-icon {
    width: 32px;
    height: 32px;
    background: var(--rec-bg-subtle);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    color: #4b5563;
}

.overview-info {
    display: flex;
    flex-direction: column;
}

.overview-info .label {
    font-size: 12px;
    color: var(--rec-text-muted);
}

.overview-info .value {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--rec-text-main);
}

.overview-info .salary-highlight {
    font-weight: 600;
    color: #15803d;
}

/* Share card */
.share-card .share-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--rec-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px 0;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--rec-radius-sm);
    text-decoration: none;
    border: 1px solid var(--rec-border);
    background: #ffffff;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-btn:hover {
    background: var(--rec-bg-subtle);
    border-color: var(--rec-border-hover);
    color: var(--rec-text-main);
}

/* --- Application Form --- */
.recruitment-apply-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid var(--rec-border);
    border-radius: var(--rec-radius-sm);
    background: #ffffff;
    color: var(--rec-text-main);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4b5563;
    box-shadow: 0 0 0 1px #4b5563;
}

/* Drop Zone CV */
.file-upload-box {
    position: relative;
}

.file-upload-box input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--rec-bg-subtle);
    border: 1px dashed var(--rec-border-hover);
    border-radius: var(--rec-radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    background: #ffffff;
    border-color: #4b5563;
}

.file-drop-zone .file-icon {
    color: var(--rec-text-subtle);
    margin-bottom: 6px;
}

.file-drop-zone .file-prompt {
    font-size: 13.5px;
    color: #374151;
}

.file-drop-zone .file-prompt strong {
    color: var(--rec-text-main);
    font-weight: 600;
}

.file-drop-zone .file-limits {
    font-size: 12px;
    color: var(--rec-text-subtle);
    margin-top: 3px;
}

.file-drop-zone .selected-file-name {
    margin-top: 6px;
    font-weight: 500;
    color: #15803d;
    font-size: 13px;
    background: #f0fdf4;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
}

.recruitment-btn-submit {
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--rec-radius-sm);
    background: #0f172a;
    color: #ffffff;
    align-self: flex-start;
}

.recruitment-btn-submit:hover {
    background: #1e293b;
}

/* Feedback Messages */
.form-feedback-message {
    padding: 12px 14px;
    border-radius: var(--rec-radius-sm);
    font-size: 13.5px;
    line-height: 1.5;
}

.form-feedback-message.feedback-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-feedback-message.feedback-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.recruitment-notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--rec-radius-sm);
    background: #f8fafc;
    border: 1px solid var(--rec-border);
    color: #475569;
    font-size: 13.5px;
}

.notice-icon {
    color: #64748b;
}

/* --- Modal Popup --- */
.recruitment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.recruitment-modal.modal-open {
    display: block;
}

.recruitment-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.recruitment-modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: var(--rec-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 10;
    border: 1px solid var(--rec-border);
}

.recruitment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 14px 24px;
    border-bottom: 1px solid var(--rec-border);
}

.modal-job-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: var(--rec-text-main);
}

.modal-sub {
    font-size: 13px;
    color: var(--rec-text-muted);
    margin: 4px 0 0 0;
}

.recruitment-modal-close {
    background: transparent;
    border: none;
    color: var(--rec-text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s;
}

.recruitment-modal-close:hover {
    color: var(--rec-text-main);
}

.recruitment-modal-body {
    padding: 20px 24px;
}

/* Empty State */
.recruitment-empty-state {
    text-align: center;
    padding: 48px 20px;
    background: #ffffff;
    border-radius: var(--rec-radius-lg);
    border: 1px solid var(--rec-border);
    grid-column: 1 / -1;
}

.empty-icon {
    color: var(--rec-text-subtle);
    margin-bottom: 12px;
}

.recruitment-empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--rec-text-main);
    margin: 0 0 6px 0;
}

.recruitment-empty-state p {
    font-size: 14px;
    color: var(--rec-text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .recruitment-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
    .filter-col.filter-search {
        grid-column: 1 / -1;
    }
    .filter-col-submit {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .recruitment-layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .recruitment-filter-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 24px;
    }
    .recruitment-archive-hero .archive-title {
        font-size: 24px;
    }
    .recruitment-modal-dialog {
        width: 95%;
    }
    .recruitment-modal-header,
    .recruitment-modal-body {
        padding: 16px 18px;
    }
}
