/*
 * File: wp-content/plugins/fw-careers/assets/css/frontend.css
 *
 * Frontend styling for the FreedomWorks Careers plugin.
 * Uses the child theme's CSS tokens (--fw-red, --fw-navy-deep, etc.)
 * when the FreedomWorks child theme is active. Falls back to hardcoded
 * values otherwise so the plugin looks reasonable on any theme.
 */

:root {
  --fwc-red:        var(--fw-red,        #B22234);
  --fwc-red-brick:  var(--fw-red-brick,  #8B1A28);
  --fwc-red-glow:   var(--fw-red-glow,   rgba(178, 34, 52, 0.4));
  --fwc-navy:       var(--fw-navy-deep,  #091830);
  --fwc-navy-ink:   var(--fw-navy-ink,   #050B18);
  --fwc-white:      var(--fw-white,      #FFFFFF);
  --fwc-off-white:  var(--fw-off-white,  #F6F7F9);
  --fwc-divider:    var(--fw-divider,    #D8D3C4);
  --fwc-fg:         var(--fw-fg,         #1F1F23);
  --fwc-fg-mute:    var(--fw-fg-mute,    #5F5F67);
  --fwc-sand:       var(--fw-sand,       #D8CBAB);
  --fwc-font-display: var(--fw-font-display, 'Big Shoulders Display', 'Oswald', 'Impact', sans-serif);
  --fwc-font-body:    var(--fw-font-body,    'Source Sans 3', -apple-system, 'Segoe UI', Roboto, sans-serif);
}

/* ============================================================
   POSITIONS GRID (shortcode output on /careers)
   ============================================================ */
.fw-careers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.fw-careers-card {
  background: var(--fwc-white);
  border: 1px solid var(--fwc-divider);
  border-top: 4px solid var(--fwc-red);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  min-height: 200px;
}
.fw-careers-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(15, 40, 71, 0.14);
}

.fw-careers-card__title {
  font-family: var(--fwc-font-display);
  font-size: 24px;
  color: var(--fwc-navy);
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.fw-careers-card__title a {
  color: inherit;
  text-decoration: none;
}
.fw-careers-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.fw-careers-card:hover .fw-careers-card__title a {
  color: var(--fwc-red);
}

.fw-careers-card__meta {
  font-family: var(--fwc-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fwc-red);
  font-weight: 700;
  margin: 0;
}
.fw-careers-card__sep {
  color: var(--fwc-fg-mute);
  margin: 0 6px;
}

.fw-careers-card__excerpt {
  font-size: 14.5px;
  color: var(--fwc-fg-mute);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.fw-careers-card__cta {
  font-family: var(--fwc-font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fwc-red);
  text-decoration: none;
  margin-top: 6px;
  position: relative;
  z-index: 2;
}

.fw-careers-empty {
  background: var(--fwc-off-white);
  padding: 32px;
  text-align: center;
  border-left: 4px solid var(--fwc-red);
}

/* ============================================================
   SINGLE POSITION PAGE (meta row + skills/tools/req lists)
   ============================================================ */
.fw-careers-meta-row {
  font-family: var(--fwc-font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fwc-red);
  font-weight: 700;
  margin: 0 0 24px 0;
}
.fw-careers-meta-sep {
  color: var(--fwc-fg-mute);
  margin: 0 8px;
}

.fw-careers-section {
  margin: 40px 0;
}
.fw-careers-section h2 {
  font-family: var(--fwc-font-display);
  font-size: 28px;
  color: var(--fwc-navy);
  letter-spacing: 0.01em;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--fwc-red);
  display: inline-block;
}

.fw-careers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 24px;
}
.fw-careers-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fwc-fg);
}
.fw-careers-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 2px;
  background: var(--fwc-red);
}

.fw-careers-inactive-notice {
  background: var(--fwc-off-white);
  padding: 20px;
  border-left: 4px solid var(--fwc-red);
  margin-bottom: 24px;
}

/* ============================================================
   APPLICATION FORM
   ============================================================ */
.fw-careers-apply-section {
  background: var(--fwc-off-white);
  padding: 32px;
  margin-top: 40px;
  border-top: 4px solid var(--fwc-red);
}

.fw-careers-apply-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}

.fw-careers-form__title {
  font-family: var(--fwc-font-display);
  font-size: 24px;
  color: var(--fwc-navy);
  margin: 0 0 8px 0;
  letter-spacing: 0.02em;
}

.fw-careers-field label {
  font-family: var(--fwc-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fwc-navy);
  display: block;
  margin-bottom: 6px;
}
.fw-careers-field .req {
  color: var(--fwc-red);
  margin-left: 2px;
}
.fw-careers-field input[type="text"],
.fw-careers-field input[type="email"],
.fw-careers-field input[type="tel"],
.fw-careers-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--fwc-font-body);
  font-size: 15px;
  color: var(--fwc-fg);
  background: var(--fwc-white);
  border: 1px solid var(--fwc-divider);
  border-radius: 0;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fw-careers-field input:focus,
.fw-careers-field textarea:focus {
  border-color: var(--fwc-red);
  box-shadow: 0 0 0 3px var(--fwc-red-glow);
}
.fw-careers-field textarea {
  min-height: 120px;
  resize: vertical;
}
.fw-careers-help {
  font-size: 13px;
  color: var(--fwc-fg-mute);
  display: block;
  margin-top: 4px;
}

/* v1.0.4: SMS consent checkbox row */
.fw-careers-field--check {
  margin-top: -4px;
}
.fw-careers-check-label {
  font-family: var(--fwc-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--fwc-fg);
  text-transform: none;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.fw-careers-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--fwc-red);
  margin: 0;
}

.fw-careers-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  font-family: var(--fwc-font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fwc-white);
  background: var(--fwc-red);
  border: 2px solid var(--fwc-red);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
  box-shadow: 0 4px 20px var(--fwc-red-glow);
}
.fw-careers-submit:hover {
  background: var(--fwc-red-brick);
  border-color: var(--fwc-red-brick);
  transform: translateY(-1px);
}

.fw-careers-success {
  background: var(--fwc-navy);
  color: var(--fwc-white);
  padding: 24px;
  border-left: 4px solid var(--fwc-red);
}
.fw-careers-success h3 {
  font-family: var(--fwc-font-display);
  margin: 0 0 8px 0;
  color: var(--fwc-white);
}

.fw-careers-errors {
  background: #f8d7da;
  color: #8b1a28;
  padding: 14px 18px;
  border-left: 4px solid var(--fwc-red);
}
.fw-careers-errors ul {
  margin: 8px 0 0 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .fw-careers-grid {
    grid-template-columns: 1fr;
  }
  .fw-careers-apply-section {
    padding: 20px 16px;
  }
  .fw-careers-submit {
    font-size: 16px;
    padding: 14px 20px;
  }
}
