/* =========================================================================
   Hiring Manager v1.0.0 — Frontend Styles
   Manager Dashboard + Public Job Listings
   ========================================================================= */

/* =========================
   SHARED: Notices, Buttons, Inputs
   ========================= */

.hm-notice { padding: 14px 20px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; font-weight: 500; }
.hm-notice--success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.hm-notice--error { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }
.hm-notice--warning { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; text-align: center; padding: 24px; border-radius: 12px; }
.hm-notice--warning a { color: #e65100; font-weight: 700; text-decoration: underline; }

.hm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; border: none; text-decoration: none;
    font-family: inherit; box-sizing: border-box; line-height: 1.4;
}
.hm-btn--primary { background: linear-gradient(135deg, #1565C0, #0D47A1); color: #fff; box-shadow: 0 2px 8px rgba(21,101,192,0.3); }
.hm-btn--primary:hover { background: linear-gradient(135deg, #1256A8, #0B3D8A); box-shadow: 0 4px 14px rgba(21,101,192,0.4); transform: translateY(-1px); color: #fff; }
.hm-btn--outline { background: #fff; border: 1.5px solid #1565C0; color: #1565C0; }
.hm-btn--outline:hover { background: #1565C0; color: #fff; }
.hm-btn--sm { padding: 6px 14px !important; font-size: 12px !important; border-radius: 6px !important; }
.hm-btn--lg { padding: 14px 32px; font-size: 16px; }
.hm-btn--danger { background: #fff; border: 1.5px solid #ef5350; color: #c62828; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; font-family: inherit; padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.hm-btn--danger:hover { background: #c62828; color: #fff; border-color: #c62828; }

.hm-input, .hm-textarea, .hm-select {
    width: 100%; padding: 11px 14px; border: 1.5px solid #ddd; border-radius: 8px;
    font-size: 14px; color: #333; background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit; box-sizing: border-box;
}
.hm-input:focus, .hm-textarea:focus, .hm-select:focus {
    border-color: #1565C0; outline: none; box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}
.hm-textarea { resize: vertical; min-height: 100px; }
.hm-select { appearance: auto; }

.hm-label { display: block; font-size: 13px; font-weight: 700; color: #444; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.hm-req { color: #c62828; }
.hm-opt { font-weight: 400; text-transform: none; color: #aaa; font-size: 12px; }
.hm-help { font-size: 12px; color: #999; margin: 4px 0 0; }


/* =========================================================================
   MANAGER DASHBOARD (WooCommerce Tab / [hiring_manager])
   ========================================================================= */

.hm-manager-wrap { max-width: 850px; margin: 0 auto; padding: 10px 0 40px; }

.hm-manager-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.hm-manager-title { font-size: 26px; font-weight: 800; color: #1a1a1a; margin: 0 0 4px; }
.hm-manager-subtitle { font-size: 14px; color: #888; margin: 0; }

.hm-list-count { font-size: 13px; font-weight: 600; color: #888; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }

/* Empty state */
.hm-empty-state { text-align: center; padding: 50px 30px; background: #fafafa; border: 2px dashed #e0e0e0; border-radius: 16px; }
.hm-empty-icon { margin-bottom: 16px; }
.hm-empty-state h3 { font-size: 20px; font-weight: 700; color: #555; margin: 0 0 6px; }
.hm-empty-state p { font-size: 14px; color: #999; margin: 0 0 20px; }

/* Job list rows */
.hm-job-list { display: flex; flex-direction: column; }
.hm-job-row {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; background: #fff; border: 1px solid #eee; border-bottom: none;
    transition: background 0.15s;
}
.hm-job-row:first-child { border-radius: 12px 12px 0 0; }
.hm-job-row:last-child { border-bottom: 1px solid #eee; border-radius: 0 0 12px 12px; }
.hm-job-row:only-child { border-radius: 12px; border-bottom: 1px solid #eee; }
.hm-job-row:hover { background: #f5f8ff; }
.hm-job-row--expired { opacity: 0.7; }

/* Type badge in row */
.hm-job-row-icon { flex-shrink: 0; }
.hm-type-badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 11px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap;
}
.hm-type--full-time { background: #e3f2fd; color: #1565C0; }
.hm-type--part-time { background: #f3e5f5; color: #7B1FA2; }
.hm-type--contract { background: #fff3e0; color: #E65100; }
.hm-type--temporary { background: #fce4ec; color: #C62828; }
.hm-type--internship { background: #e8f5e9; color: #2E7D32; }
.hm-type--volunteer { background: #f1f8e9; color: #558B2F; }

/* Row info */
.hm-job-row-info { flex: 1; min-width: 0; }
.hm-job-row-title { font-size: 16px; font-weight: 700; color: #1a1a1a; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-job-row-meta { display: flex; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.hm-job-row-meta span { font-size: 12px; color: #888; white-space: nowrap; }

/* Status badges */
.hm-job-row-status { flex-shrink: 0; display: flex; gap: 4px; flex-direction: column; align-items: flex-end; }
.hm-status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.hm-status--open { background: #e8f5e9; color: #2e7d32; }
.hm-status--closed { background: #fce4ec; color: #c62828; }
.hm-status--paused { background: #fff3e0; color: #e65100; }
.hm-status--draft { background: #f5f5f5; color: #999; }
.hm-status--expired { background: #ffebee; color: #b71c1c; font-size: 10px; }

.hm-job-row-actions { display: flex; gap: 6px; flex-shrink: 0; }


/* =========================================================================
   ADD/EDIT FORM
   ========================================================================= */

.hm-form-wrap { max-width: 780px; margin: 0 auto; padding: 10px 0 40px; }

.hm-form-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.hm-form-title { font-size: 24px; font-weight: 700; color: #1a1a1a; margin: 0 0 4px; }
.hm-form-subtitle { font-size: 14px; color: #888; margin: 0; }

.hm-form { display: flex; flex-direction: column; gap: 0; }

/* Section groups */
.hm-form-section-group {
    background: #fff; border: 1px solid #e8e8e8; border-radius: 14px;
    padding: 24px 28px; margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.03);
}
.hm-section-head {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0;
}
.hm-section-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.hm-section-title { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 0 0 2px; }
.hm-section-desc { font-size: 13px; color: #888; margin: 0; }

.hm-field { margin-bottom: 18px; }
.hm-field:last-child { margin-bottom: 0; }
.hm-field-row { display: flex; gap: 16px; margin-bottom: 18px; }
.hm-field-half { flex: 1; }
.hm-field-row .hm-field { margin-bottom: 0; }

.hm-form-actions { display: flex; gap: 12px; align-items: center; margin-top: 4px; }


/* =========================================================================
   PUBLIC JOB LISTINGS — [job_listings]
   ========================================================================= */

.hm-listings {
    display: flex; flex-direction: column; gap: 20px; margin: 20px 0;
}
.hm-listings.hm-cols--2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.hm-listings.hm-cols--3 { display: grid; grid-template-columns: repeat(3, 1fr); }

.hm-listing-card {
    background: #fff; border: 1px solid #e8e8e8; border-radius: 14px;
    padding: 28px 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s, transform 0.3s;
}
.hm-listing-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.hm-listing--expired { opacity: 0.65; }

.hm-listing-header { margin-bottom: 14px; }
.hm-listing-title { font-size: 22px; font-weight: 800; color: #1a1a1a; margin: 0 0 8px; line-height: 1.3; }
.hm-listing-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.hm-badge--type { background: #e3f2fd; color: #1565C0; }
.hm-badge--exp { background: #f3e5f5; color: #7B1FA2; }
.hm-badge--expired { background: #ffebee; color: #b71c1c; }

.hm-listing-meta {
    display: flex; flex-wrap: wrap; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 16px;
}
.hm-meta-item { font-size: 14px; color: #666; white-space: nowrap; }

.hm-listing-depts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hm-dept-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #e3f2fd; color: #1565C0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

.hm-listing-desc { font-size: 15px; line-height: 1.7; color: #555; margin-bottom: 16px; }
.hm-listing-desc p { margin: 0 0 10px; } .hm-listing-desc p:last-child { margin-bottom: 0; }

.hm-listing-section { margin-bottom: 16px; }
.hm-listing-section-title {
    font-size: 14px; font-weight: 700; color: #333; margin: 0 0 8px;
    text-transform: uppercase; letter-spacing: 0.3px;
    padding-bottom: 6px; border-bottom: 1px solid #f0f0f0;
}
.hm-listing-section-content { font-size: 14px; line-height: 1.65; color: #666; }
.hm-listing-section-content p { margin: 0 0 8px; } .hm-listing-section-content p:last-child { margin-bottom: 0; }
.hm-listing-section-content ul { margin: 0 0 8px 18px; padding: 0; }
.hm-listing-section-content li { margin-bottom: 4px; }

.hm-listing-apply {
    margin-top: 20px; padding-top: 18px; border-top: 1px solid #f0f0f0;
}
.hm-btn--apply { padding: 14px 36px; font-size: 16px; }

.hm-public-empty {
    text-align: center; padding: 40px; background: #fafafa;
    border: 1px solid #eee; border-radius: 12px; color: #888; font-size: 15px;
}
.hm-public-empty p { margin: 0; }


/* =========================
   RESPONSIVE
   ========================= */

@media screen and (max-width: 768px) {
    .hm-manager-header, .hm-form-header { flex-direction: column; }
    .hm-field-row { flex-direction: column; gap: 0; }
    .hm-field-row .hm-field { margin-bottom: 18px; }
    .hm-form-section-group { padding: 18px 16px; }

    .hm-job-row { flex-wrap: wrap; gap: 10px; padding: 14px; }
    .hm-job-row-info { flex-basis: calc(100% - 120px); min-width: 0; }
    .hm-job-row-status { order: 4; }
    .hm-job-row-actions { order: 5; margin-left: auto; }

    .hm-listings.hm-cols--2,
    .hm-listings.hm-cols--3 { grid-template-columns: 1fr; }

    .hm-listing-card { padding: 20px 18px; }
    .hm-listing-title { font-size: 18px; }
    .hm-listing-meta { gap: 10px; }
}

@media screen and (max-width: 480px) {
    .hm-job-row-meta { display: none; }
    .hm-job-row-status { display: none; }
    .hm-job-row-title { font-size: 14px; }
    .hm-manager-title { font-size: 22px; }
}
