.jr-jobs,
.jr-job,
.jr-apply,
.jr-form {
  width: 100%;
  box-sizing: border-box;
}

/* Ensure no theme leaks for these containers */
.jr-jobs *, .jr-job *, .jr-apply *, .jr-form * {
  box-sizing: border-box;
}

.jr-jobs {
  display: block;
  margin: 2rem 0;
}

.jr-jobs__header,
.jr-job__header {
  margin-bottom: 1.5rem;
}

.jr-jobs__header h2,
.jr-job__title,
.jr-apply__title,
.jr-job__section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.jr-job__content {
  line-height: 1.6;
}

.jr-job__content ul,
.jr-job__content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.jr-job__content li {
  margin-bottom: 0.5rem;
}

.jr-jobs__list {
  display: grid;
  gap: 1.5rem;
}

.jr-job-card,
.jr-apply {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  background: #fff;
}

.jr-job-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
}

.jr-job-card__media {
  width: 150px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f2f4f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.jr-job-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jr-job-card__body {
  min-width: 0;
}

.jr-job-card__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.jr-job-card__meta,
.jr-job__meta,
.jr-job__reference,
.jr-jobs__empty,
.jr-job__empty {
  margin: 0;
}

.jr-job-card__meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
}

.jr-job-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #555;
}

.jr-job-card__meta-item .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #1C75BC;
}

.jr-job-id-dimmed {
  font-size: 0.85em;
  color: #94999b;
  font-weight: 400;
  margin-left: 10px;
  vertical-align: middle;
}

.jr-job-card__excerpt-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.jr-job-card__excerpt-wrapper .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #1C75BC;
  flex-shrink: 0;
  margin-top: 2px;
}

.jr-job-card__excerpt {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tag Styles */
.jr-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jr-tag {
  background: #f0f4f8;
  color: #1C75BC;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #d0e1f0;
  white-space: nowrap;
}

.jr-job-card__action {
  padding-left: 1rem;
}

.jr-job-card__meta,
.jr-job__meta {
  color: inherit;
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.jr-job-card__separator,
.jr-job__separator {
  display: inline-block;
  margin: 0 0.5rem;
  color: #ccc;
}

.jr-job__meta strong {
  color: #1C75BC;
}


.jr-job-card__footer {
  margin-top: 1rem;
}

.jr-job-card__link,
.jr-button {
  display: inline-block;
  text-decoration: none;
}

.jr-job__section,
.jr-form__group,
.jr-notice {
  margin-top: 1.5rem;
}

.jr-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.jr-job__content > *:first-child {
  margin-top: 0;
}

.jr-job__content > *:last-child {
  margin-bottom: 0;
}

.jr-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.jr-form fieldset {
  border: 0;
  padding: 0;
}

.jr-form legend {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.jr-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 1rem;
  font-weight: 400;
}

.jr-required {
  color: #d63638;
  margin-left: 2px;
}

.jr-form input[type="text"],
.jr-form input[type="email"],
.jr-form input[type="file"],
.jr-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.jr-form__actions {
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.jr-tabs {
  margin: 2rem 0;
}

.jr-tabs__nav {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.jr-tabs__btn {
  color: #555;
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 600;
  opacity: 0.6;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.jr-tabs__btn:hover {
  opacity: 1;
  border-bottom: 2px solid #1C75BC;
}

.jr-tabs__btn.active {
  opacity: 1;
  color: #1C75BC;
  border-bottom-color: #1C75BC;
}

.jr-tabs__btn--danger {
  /* color: #d63638; */
  opacity: 0.8;
  /* border-radius: 4px; */
}

.jr-tabs__btn--danger.active {
  opacity: 1;
  color: #d63638;
  border-bottom-color: #d63638;
}

.jr-tabs__btn--danger:hover {
  background: #fcf0f0;
}

.jr-dimmed {
  opacity: 0.5;
  cursor: not-allowed;
}

.jr-tabs__btn:focus {
  outline: none;
}

.jr-tabs__pane {
  display: none;
}

.jr-tabs__pane.active {
  display: block;
}

.jr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  background: #1C75BC;
  color: #fff;
  margin: 0;
}

.jr-button:hover:not(:disabled) {
  background: #155a91;
  color: #fff;
}

.jr-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #a7aaad;
  color: #f6f7f7;
  border-color: #dcdcde;
}

.jr-button--outline {
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  color: #2c3338;
}

.jr-button--outline:hover:not(:disabled) {
  background: #f0f0f1;
  border-color: #8c8f94;
  color: #262c33;
}

.jr-questionnaire-toggle,
.jr-gdpr-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100%;
  text-align: left;
  padding: 12px 15px;
}

.jr-questionnaire-toggle.is-active {
  background: #fff;
  border-color: #1C75BC;
  color: #1C75BC;
}

.jr-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.jr-toggle-icon::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  transition: transform 0.2s;
}

.jr-questionnaire-toggle.is-active .jr-toggle-icon::after {
  transform: rotate(180deg);
}

.jr-gdpr-toggle.is-active .jr-toggle-icon::after {
  transform: rotate(180deg);
}

.jr-spinner {
  display: none;
  vertical-align: middle;
  margin: 0 10px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: #000;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: jr-spin 1s linear infinite;
}

.jr-form.submitting .jr-spinner {
  display: inline-block;
}

@keyframes jr-spin {
  to { transform: rotate(360deg); }
}

.jr-email-field-wrapper {
  display: flex !important;
  width: 100%;
  gap: 10px;
  align-items: stretch;
  flex-wrap: nowrap !important;
}

.jr-email-field-wrapper input {
  display: block;
  flex: 1 1 auto;
  margin-bottom: 0 !important;
  min-width: 0;
  width: auto !important;
}

.jr-email-field-wrapper .jr-button {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  white-space: nowrap;
  width: auto !important;
  margin: 0 !important;
}

.jr-verification-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: stretch;
  padding: 0 12px;
  border: 1px solid #00a32a;
  border-radius: 3px;
  background: #edfaef;
  color: #116329;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.jr-inline-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 4px solid #72aee6;
  background: #f6f7f7;
  color: #1d2327;
  font-size: 0.875rem;
}

.jr-inline-notice.is-success {
  border-left-color: #00a32a;
}

.jr-inline-notice.is-error {
  border-left-color: #d63638;
}

.jr-inline-notice p {
  margin: 0;
}

.jr-totp-input-group {
  display: flex !important;
  width: 100%;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.jr-totp-input-group input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
}

.jr-totp-input-group .jr-button {
  display: inline-block !important;
  flex: 0 0 auto;
  width: auto !important;
  margin: 0 !important;
}

.jr-totp-wrapper {
  margin-top: 10px;
}

.jr-questionnaire-container {
  margin-top: 15px;
  padding: 15px;
  border-left: 3px solid #1C75BC;
  background: #f0f7fd;
}

.jr-questionnaire-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.jr-questionnaire-toggle-wrapper input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
}

.jr-mandatory-badge {
  color: #d32f2f;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  margin-left: 5px;
}

.jr-job-card--expired {
  opacity: 0.7;
  border-color: #4c4c4c;
}
.jr-badge--expired {
  display: inline-block;
  background: #4c4c4c;
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 10px;
  vertical-align: middle;
}

.jr-gdpr-box {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  background: #f9f9f9;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 10px;
  border-radius: 4px;
}

.jr-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
  text-decoration: none;
  color: #2271b1;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.1s ease-in-out;
}

.jr-back-link:hover {
  color: #135e96;
}

.jr-back-link .jr-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f0f0f1;
  border-radius: 4px;
  color: #2271b1;
  border: 1px solid #dcdcde;
  font-size: 18px;
  line-height: 1;
}

.jr-back-link:hover .jr-back-icon {
  background: #fff;
  border-color: #2271b1;
}

.jr-notice {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.jr-notice-success {
  background: rgba(37, 127, 72, 0.08);
  border: 1px solid rgba(37, 127, 72, 0.2);
}

.jr-notice-error {
  background: rgba(173, 42, 42, 0.08);
  border: 1px solid rgba(173, 42, 42, 0.2);
}

.jr-job-card--detail {
  margin-bottom: 2.5rem;
  align-items: flex-start;
  grid-template-columns: 150px minmax(0, 1fr);
}

.jr-job-card--detail .jr-job-card__title {
  margin-top: 0;
}

.jr-job-card--no-border {
  border: none !important;
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .jr-job-card--detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .jr-job-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
  }

  .jr-job-card__meta-grid {
    grid-template-columns: 1fr;
  }

  .jr-job-card__action {
    padding-left: 0;
    margin-top: 1rem;
    width: 100%;
  }

  .jr-job-card__action .jr-button {
    width: 100%;
  }

  .jr-job-card__media {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  .jr-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .jr-email-field-wrapper,
  .jr-totp-input-group {
    flex-wrap: wrap !important;
    align-items: stretch;
  }

  .jr-email-field-wrapper .jr-button,
  .jr-verification-badge,
  .jr-totp-input-group .jr-button {
    width: 100%;
    justify-content: center;
  }

  .jr-job-card__excerpt-wrapper {
    flex-direction: column;
    gap: 5px;
  }
}
