/* job-preview.css (Refactored & Themed) */
:root {
  --font-sans: 'Inter', sans-serif;
  --color-primary: #4CAF50;
  --color-primary-dark: #388E3C;
  --color-text: #333;
  --color-muted: #666;
  --color-bg: #f9f9f9;
  --color-border: #e2e2e2;
  --radius: 6px;
}


.job-page__header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0;
}
.job-page__title {
  font-size: 2.5rem;
  margin: 0;
}
.company-info {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}
.company-info__logo {
  height: 50px;
  margin-right: 1rem;
}
.company-info__name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-muted);
}
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  color: var(--color-muted);
}
.meta-list li {
  font-size: 0.95rem;
}
.job-page__body {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin-top: 2rem;
}
.section {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}
.section__title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  color: var(--color-text);
}

.benefits-list,
.details-list {
  margin: 0;
  padding: 0;
}
.benefits-list li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  list-style-type: disc;
}
.details-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  row-gap: 0.8rem;
  column-gap: 1.2rem;
}
.details-list dt {
  font-weight: 600;
  color: var --color-text;
}
.details-list dd {
  margin: 0;
  color: var(--color-muted);
}
.job-page__sidebar {
  position: sticky;
  top: 2rem;
}
.apply-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.apply-card__title {
  margin-top: 0;
  font-size: 1.4rem;
  color: var(--color-text);
}
.button {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  text-align: center;
}
.button--primary {
  background: var(--color-primary);
  color: #fff;
}
.button--primary:hover {
  background: var(--color-primary-dark);
}
.button--outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}
.button--outline:hover {
  background: var(--color-primary);
  color: #fff;
}


/* partials-application-form.css */

.application-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

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

.field-group__label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.radio-inline,
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.input--file {
  margin-top: 0.5rem;
}

.input--text,
.input--select,
.input--textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-top: 0.5rem;
  box-sizing: border-box;
}

.input--select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.65rem;
}

.input--textarea {
  resize: vertical;
  min-height: 120px;
}

.text--muted {
  color: var(--color-muted);
  font-style: italic;
  margin-left: 0.5rem;
}

.text--optional {
  color: var(--color-muted);
  font-style: italic;
  margin-left: 0.25rem;
  font-size: 0.9rem;
}

.text--required {
  color: var(--color-primary);
  margin-left: 0.25rem;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  padding: 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.warning-box .button--small {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

.button {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.button--primary {
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
}

.button--primary:hover {
  background: var(--color-primary-dark);
}

.apply-btn {
  align-self: flex-start;
}

.link--small {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: underline;
  margin-left: 0.5rem;
}

.link--small:hover {
  color: var(--color-primary-dark);
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-width: 90%;
  width: 400px;
  z-index: 1000;
}
.modal-content {
  padding: 1.5rem;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-content h2 {
  margin-top: 0;
  font-size: 1.25rem;
}
.modal-content p {
  margin: 1rem 0;
  line-height: 1.5;
}
.modal-content .link {
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .job-page__body { grid-template-columns: 1fr; }
  .job-page__sidebar { position: static; margin-top: 2rem; }
}

.company-info .company-logo,
img.company-logo {
  width: 80px !important;
  height: 80px !important;
  object-fit: contain;
  display: block;
  margin-bottom: 0.5rem;
  margin-right: 1rem;
  border-radius: 4px;
  background-color: #fff;
  padding: 1px;
  border: 2px solid #4CAF50;
}

/* Responsive override */
@media (max-width: 768px) {
  .company-info .company-logo,
  img.company-logo {
    width: 60px !important;
    height: 60px !important;
  }
  
  .section {
  }
}

#application-form-message {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.form-message {
  padding: 1rem;
  border-radius: 4px;
}
.form-message--success {
  background: #e6ffed;
  border: 1px solid #a3d9a5;
  color: #256029;
}
.form-message--error {
  background: #ffe6e6;
  border: 1px solid #d9a3a3;
  color: #602525;
}
.form-message--info {
  background: #e6f0ff;
  border: 1px solid #a3bde6;
  color: #253660;
}
.form-message a {
  font-weight: 600;
  text-decoration: underline;
  color: inherit;
}

/* Drag‑&‑drop area */
.upload-area__inner {
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area__inner.dragover {
  border-color: #4CAF50;
  background: #f0fdfa;
}
.upload-area__input {
  display: none;
}
.upload-area__filename {
  margin-top: .5rem;
  font-size: .9rem;
  color: #555;
}
/* Link‑style button inside */
.link-button {
  background: none;
  border: none;
  color: #4CAF50;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
/* Character counter */
.char-counter {
  text-align: right;
  font-size: .85rem;
  color: #666;
  margin-top: .25rem;
}
/* Required asterisk */
.field-group .required {
  color: #c0392b;
  margin-left: .25rem;
}
/* Error/Success messages above submit (if not already) */
#application-form-message { margin-bottom: 1rem; }
/* (Assume your .form-message styles exist already) */

/* Salary wrapper */
.salary-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Fixed symbol prefix */
.currency-prefix {
  font-size: 1.1rem;
  padding: 0 0.5rem;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  display: inline-flex;
  align-items: center;
}

/* Currency select when employer didn’t set one */
.input--currency-select {
  max-width: 110px;
}

/* Amount input */
.input--currency-amount {
  flex: 1;
  border-radius: 0 4px 4px 0;
  padding-left: 0.75rem;
  box-sizing: border-box;
}

/* Error message under the field */
.field-error {
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Base card for each field-group */
.field-group {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow .2s, border-color .2s;
}

/* On input focus anywhere inside, lift the card */
.field-group:focus-within {
  border-color: #4CAF50;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Label styling */
.field-group__label {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

/* Optional icon wrapper (if you choose to add icons) */
.field-group__label .icon {
  display: inline-block;
  width: 1.2em;
  margin-right: 0.5em;
  font-size: 1.2rem;
  color: #4CAF50;
}

/* Inputs, selects, textareas inside cards */
.field-group select,
.field-group textarea {
  width: 100%;
  padding: .6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(26,188,156,0.2);
}

/* Radio/checkbox inline labels */
.radio-inline,
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 1rem;
  margin-top: 0.5rem;
  font-size: .95rem;
  cursor: pointer;
}

.radio-inline input,
.checkbox-inline input {
  margin-right: .3rem;
}

/* Buttons inside cards */
.field-group button,
.field-group .link-button {
  margin-top: .5rem;
}

/* Error messages scoped under a field-group */
.field-group .field-error {
  margin-top: .5rem;
}

/* Draggable upload area adjustments */
.upload-area__inner {
  background: #fafafa;
  transition: background .2s, border-color .2s;
  border-radius: 4px;
}

.upload-area__inner.dragover {
  background: #f0fcfa;
  border-color: #4CAF50;
}

/* Salary & CV variants (accented borders) */
.field-group--salary {
  border-left: 4px solid #f1c40f;  /* golden accent */
}
.field-group--cv {
  border-left: 4px solid #3498db;  /* blue accent */
}
.field-group--experience {
  border-left: 4px solid #9b59b6;  /* purple accent */
}
.field-group--cover-letter {
  border-left: 4px solid #e74c3c;  /* red accent */
}

.field-group--cv {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.field-group--cv .field-group__label {
  margin-bottom: 0.5rem;
}

.field-group--cv .radio-inline {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  border: 2px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  position: relative;
  user-select: none;
}

.field-group--cv .radio-inline:not(:last-child) {
  margin-right: 0.5rem;
}

.field-group--cv .radio-inline input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
}

.field-group--cv .radio-inline:hover {
  border-color: #4CAF50;
  background: rgba(26, 188, 156, 0.05);
}

.field-group--cv .radio-inline input:checked + * {
  /* This won’t catch the span, but we can style via parent .selected via JS if needed */
}

/* Fallback selected style via JS */
.field-group--cv .radio-inline.selected {
  border-color: #4CAF50;
  background: rgba(26, 188, 156, 0.1);
}

/* ===================================== */
/* 2) Upload Area “card”                  */
/* ===================================== */

#upload-area {
  margin-top: 0.5rem;
}

.upload-area__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 2px dashed #ccc;
  border-radius: 8px;
  transition: border-color .2s, background .2s;
  background: #fafafa;
  text-align: center;
}

.upload-area__inner:hover {
  background: #f5fdfa;
  border-color: #4CAF50;
}

.upload-area__inner.dragover {
  background: #e8fdf6;
  border-color: #4CAF50;
}

.upload-area__text {
  font-size: 0.95rem;
  color: #555;
}

.link-button {
  background: none;
  border: none;
  color: #4CAF50;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
}

.upload-area__filename {
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.25rem;
  word-break: break-all;
}

/* Checkbox under upload area */
#upload-area .checkbox-inline {
  margin-top: 0.75rem;
  justify-content: center;
}

/* Hide by default */
.apply-now-mobile {
  display: none;
  margin-top: 1rem;
  width: 100%;
  text-align: center;
}

/* Show on small screens */
@media (max-width: 768px) {
  .apply-now-mobile {
    display: inline-block;
  }
}

.section,
.apply-card {
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  box-sizing: border-box;
}

img,
video,
iframe,
table {
  max-width: 100%;
  height: auto;
}

p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ====== Hero Header ====== */
.job-hero {
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
  padding: 2rem 0;
}
.job-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo / Company */

.job-hero__logo-img {
  max-height: 60px;
  margin-bottom: 0.5rem;
  padding: 1px;
  border: 2px solid #4CAF50;
}
.job-hero__company-name {
  font-size: 1rem;
  font-weight: 500;
  color: #555;
}

/* Title & Meta */
.job-hero__info {
  flex: 1;
}
.job-hero__title {
  font-size: 2.25rem;
  margin: 0 0 0.75rem;
  color: #222;
  padding-left: 100px;
}
.job-hero__meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  color: #666;
  font-size: 0.95rem;
}
.job-hero__meta-list li {
  display: flex;
  align-items: center;
}
.job-hero__meta-list .icon {
  margin-right: 0.4rem;
  color: #4CAF50;
  font-size: 1.1rem;
}
.job-hero__meta-secondary {
  display: flex;
  gap: 1.5rem;
  color: #999;
  font-size: 0.9rem;
}
.job-hero__meta-secondary .icon {
  margin-right: 0.3rem;
  font-size: 1rem;
}

/* CTA */
.job-hero__cta .button {
  white-space: nowrap;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Icons (use unicode or replace with SVG/font your design uses) */
.icon-location:before      { content: "\1F4CD"; } /* 📍 */
.icon-salary:before        { content: "\1F4B0"; } /* 💰 */
.icon-qualification:before { content: "\1F393"; } /* 🎓 */
.icon-experience:before    { content: "\23F2"; } /* ⏲ */
.icon-calendar:before      { content: "\1F4C5"; } /* 📅 */
.icon-people:before        { content: "\1F465"; } /* 👥 */

/* Responsive tweaks */
@media (max-width: 1024px) {
  .job-hero__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .job-hero__cta {
    width: 100%;
    margin-top: 1rem;
  }
  .job-hero__cta .button {
    display: block;
    width: 100%;
    text-align: center;
  }
}


/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem; /* so content can scroll on small screens */
  overflow-y: auto;
}

/* Modal Content Box */
.modal-content {
  background: #fff;
  padding: 1.5rem;
  width: 100%;
  max-width: 600px;    /* wider on desktop */
  border-radius: 6px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Form Fields */
#report-form {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr; /* default one column */
  grid-row-gap: 1rem;
  grid-column-gap: 1rem;
}

/* Guest two-column layout */
#report-form.is-guest {
  grid-template-columns: repeat(2, 1fr);
}

/* Make “Details” textarea span full width */
#report-form textarea {
  grid-column: 1 / -1;
  resize: vertical;
  min-height: 80px;
}

/* Label styling */
#report-form label {
  display: block;
  font-weight: bold;
}

/* Inputs, selects, textarea */
#report-form input,
#report-form select,
#report-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

/* Submit Button */
#report-form button[type="submit"] {
  grid-column: 1 / -1;         /* full width */
  margin-top: 0.5rem;
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}
#report-form button[type="submit"]:hover {
  background: #c0392b;
}

/* Form message */
.form-message {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  #report-form,
  #report-form.is-guest {
    grid-template-columns: 1fr;
  }
  .modal-content {
    max-width: 100%;
  }
}

/* Employer Logo + Name link block */
.company-logo__link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 1rem;
  padding: 0.25rem 0;
  transition: background-color .2s;
}

.company-logo__link:hover {
  background-color: rgba(26, 188, 156, 0.05); /* light mint hover */
}

/* Logo image */
.company-logo__img {
  max-height: 60px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #4CAF50;
  padding: 2px;
}

/* Company name next to it */
.company-logo__name {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}

/* On small screens, stack vertically */
@media (max-width: 768px) {
  .company-logo__link {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .job-hero__title {
      padding-left: 20px;
  }
}

/* Links in the hero meta list */
.job-hero__meta-list .job-hero__link {
  color: #4CAF50;
  text-decoration: none;
  transition: color .2s, text-decoration .2s;
}

.job-hero__meta-list .job-hero__link:hover {
  color: #17a589;
  text-decoration: underline;
}

/* Ensure the salary/non-link items stay correctly aligned */
.job-hero__meta-list li {
  display: flex;
  align-items: center;
}

/* Adjust icon spacing if needed */
.job-hero__meta-list .icon {
  margin-right: 0.4rem;
  font-size: 1.1rem;
  color: #4CAF50;
}

/* Primary‐color links in job details */
.link--primary {
  color: #4CAF50;
  text-decoration: none;
  transition: color .2s, text-decoration .2s;
}

.link--primary:hover,
.link--primary:focus {
  color: #388E3C;               /* slightly darker on hover */
  text-decoration: underline;
}

/* Ensure definition list styling remains neat */
.details-list dt {
  font-weight: 600;
}

.details-list dd {
  margin: 0.25rem 0 0.5rem 0;
  line-height: 1.5;
}



.job-card {
  position: relative;
}

.job-card:hover::after {
    content: "Save this Job";
    position: absolute;
    background-color: black;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    top: -30px;
    left: 90%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}
  
.job-card .save-btn {
  position: absolute;
  top: -1rem;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-muted);
  transition: color 0.2s ease;
}
.job-card .save-btn:hover {
  color: var(--color-primary-dark);
}
/* when saved, switch to solid and primary color */
.job-card .save-btn.saved i {
  color: var(--color-primary);
}
.job-card .save-btn.saved i.far { /* replace regular with solid */
  display: none;
}
.job-card .save-btn.saved i.fas {
  display: inline;
}

/* ensure you have both regular+solid bookmark icons available */
.save-btn i.far.fa-bookmark { /* empty bookmark */ }
.save-btn i.fas.fa-bookmark { /* filled bookmark, hidden by default */ display:none; }

.application-closed-notice {
  background: #FFF4E5;
  border-left: 4px solid #FFA726;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #663C00;
  border-radius: 4px;
  font-size: 0.95rem;
}
.application-closed-notice p {
  margin: 0;
}
.application-form button[disabled] {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  opacity: 0.6;
}
