/* Piros Careers — Frontend Stylesheet
   All rules scoped under .pc-careers-wrap to avoid theme conflicts. */

.pc-careers-wrap {
  --pc-accent:       var(--wp--preset--color--red, #e0232f);
  --pc-accent-hover: #b81c27;
  --pc-text:         #1a1a1a;
  --pc-muted:        #767676;
  --pc-border:       #e0e0e0;
  --pc-radius:       4px;
  --pc-bg-light:     #f7f7f7;

  box-sizing: border-box;
  color: var(--pc-text);
  font-size: 1.125rem;
  line-height: 1.5;
}

.pc-careers-wrap *,
.pc-careers-wrap *::before,
.pc-careers-wrap *::after {
  box-sizing: inherit;
}

/* ── Two-column layout ─────────────────────────────────────────────────────── */

.pc-careers-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .pc-careers-wrap {
    grid-template-columns: 1fr;
  }
}

/* ── State filter pills ────────────────────────────────────────────────────── */

.pc-location-filter {
  margin: 0 0 20px;
}

/* ── Job count ─────────────────────────────────────────────────────────────── */

.pc-job-count {
  color: var(--pc-text);
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 10px;
}

/* ── Job list ──────────────────────────────────────────────────────────────── */

.pc-job-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-job-item {
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--pc-border);
  cursor: pointer;
  padding: 12px 12px 12px 14px;
  transition: background 0.15s, border-color 0.15s;
}

.pc-job-item:last-child {
  border-bottom: none;
}

.pc-job-item:hover {
  background: var(--pc-bg-light);
  border-left-color: var(--pc-accent);
}

.pc-job-item--active {
  background: var(--pc-bg-light);
  border-left-color: var(--pc-accent);
}

.pc-job-item__title {
  background: none;
  border: none;
  color: var(--pc-accent);
  cursor: pointer;
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 4px;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  width: 100%;
}

.pc-job-item__title:hover {
  color: var(--pc-accent-hover);
}

.pc-job-item__meta {
  align-items: center;
  color: var(--pc-muted);
  display: flex;
  font-size: 0.9375rem;
  gap: 4px;
  margin-bottom: 2px;
}

.pc-job-item__jobid {
  color: var(--pc-muted);
  display: block;
  font-size: 0.875rem;
  margin-top: 2px;
}

/* ── SVG icons ─────────────────────────────────────────────────────────────── */

.pc-icon {
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Job detail panel ──────────────────────────────────────────────────────── */

.pc-job-detail-col {
  position: relative;
  transition: opacity 0.2s;
}

.pc-job-detail-col.is-loading {
  opacity: 0.4;
  pointer-events: none;
}

.pc-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pc-detail-title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.pc-apply-btn {
  background: var(--pc-accent);
  border: none;
  border-radius: var(--pc-radius);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 10px 22px;
  transition: background 0.15s;
  white-space: nowrap;
}

.pc-apply-btn:hover {
  background: var(--pc-accent-hover);
}

.pc-detail-meta {
  display: grid;
  gap: 8px 24px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
}

.pc-detail-meta__item {
  align-items: center;
  color: var(--pc-muted);
  display: flex;
  font-size: 1rem;
  gap: 6px;
}

.pc-detail-meta__item--full {
  grid-column: 1 / -1;
}

.pc-detail-divider {
  border: none;
  border-top: 1px solid var(--pc-border);
  margin: 0 0 20px;
}

.pc-detail-content {
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ── Modal overlay ─────────────────────────────────────────────────────────── */

.pc-modal-overlay {
  --pc-accent:       var(--wp--preset--color--red, #e0232f);
  --pc-accent-hover: #b81c27;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  max-width: 100%; /* Gutenberg */
  position: fixed;
  right: 0;
  top: 0;
  z-index: 99999;
}

.pc-modal-overlay[hidden] {
  display: none;
}

.pc-modal-card {
  background: #fff;
  border-radius: 6px;
  max-height: 90vh;
  max-width: 640px;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  width: 94%;
}

.pc-modal-close {
  background: none;
  border: none;
  color: var(--pc-muted);
  cursor: pointer;
  font-size: 1.375rem;
  line-height: 1;
  padding: 4px 8px;
  position: absolute;
  right: 12px;
  top: 12px;
  transition: color 0.15s;
}

.pc-modal-close:hover {
  color: var(--pc-text);
}

#pc-modal-title {
  font-size: 1.375rem;
  margin: 0 0 20px;
}

.pc-modal-form-wrap input[type="submit"] {
  background: var(--pc-accent) !important;
  border-color: var(--pc-accent) !important;
  color: #fff !important;
}

.pc-modal-form-wrap input[type="submit"]:hover {
  background: var(--pc-accent-hover) !important;
  border-color: var(--pc-accent-hover) !important;
}

.pc-modal-form-wrap input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.pc-modal-form-wrap select,
.pc-modal-form-wrap textarea {
  font-size: 16px !important; /* Safari phones */
}

@media (max-width: 768px) {
  .pc-modal-form-wrap .gform_fields {
    row-gap: 18px !important;
  }
}

/* ── Detail placeholder ────────────────────────────────────────────────────── */

.pc-detail-placeholder {
  align-items: center;
  color: var(--pc-muted);
  display: flex;
  font-size: 1.125rem;
  font-style: italic;
  justify-content: center;
  min-height: 200px;
}

.pc-detail-placeholder p {
  margin: 0;
}

/* ── No jobs message ───────────────────────────────────────────────────────── */

.pc-no-jobs {
  color: var(--pc-muted);
  font-style: italic;
}
