/* Real Tacos careers embed.
   Inherits the host site's font-family — never set one here.
   All colors via CSS custom properties so the agency can override:
     #rt-careers, .rt-modal { --rt-primary: #...; }
   The modal is included because <dialog> renders at the body level,
   outside the #rt-careers scope.
*/

#rt-careers,
.rt-modal {
  --rt-primary: #1e93da;
  --rt-primary-hover: #0a5c8e;
  --rt-secondary: #b32518;
  --rt-foreground: #1a2429;
  --rt-surface: #f6f6f6;
  --rt-border: #e7e7e7;
  --rt-muted: #9aa1a4;

  --rt-radius-pill: 100px;
  --rt-radius-card: 0.5rem;
  --rt-radius-input: 0.5rem;

  color: var(--rt-foreground);
  font-size: 16px;
  line-height: 1.5;
}

#rt-careers *,
.rt-modal *,
.rt-modal *::before,
.rt-modal *::after,
#rt-careers *::before,
#rt-careers *::after {
  box-sizing: border-box;
}

/* ===== Tab toggle ===== */
.rt-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--rt-surface);
  border-radius: var(--rt-radius-pill);
  margin-bottom: 1.5rem;
}
.rt-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: var(--rt-radius-pill);
  font: inherit;
  color: var(--rt-foreground);
  cursor: pointer;
}
.rt-tab[aria-selected="true"] {
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

/* ===== Location grid ===== */
.rt-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .rt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .rt-grid { grid-template-columns: repeat(3, 1fr); }
}

.rt-card {
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-card);
  background: white;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rt-card__photo {
  aspect-ratio: 16 / 9;
  background: var(--rt-surface);
  background-size: cover;
  background-position: center;
}
.rt-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.rt-card__name {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0;
}
.rt-card__address {
  font-size: 0.875rem;
  color: var(--rt-muted);
  margin: 0;
}

.rt-job-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rt-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-input);
  background: var(--rt-surface);
}
.rt-job__title {
  font-weight: 500;
}
.rt-job__meta {
  font-size: 0.75rem;
  color: var(--rt-muted);
  margin-top: 0.125rem;
}
.rt-job__cta {
  appearance: none;
  border: 0;
  background: var(--rt-primary);
  color: white;
  padding: 0.4rem 0.85rem;
  border-radius: var(--rt-radius-pill);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.rt-job__cta:hover {
  background: var(--rt-primary-hover);
}

.rt-empty {
  font-size: 0.875rem;
  color: var(--rt-muted);
  font-style: italic;
}

/* ===== By Position view ===== */
.rt-positions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.rt-position-tab {
  appearance: none;
  border: 1px solid var(--rt-border);
  background: white;
  padding: 0.4rem 0.85rem;
  border-radius: var(--rt-radius-pill);
  font: inherit;
  cursor: pointer;
}
.rt-position-tab[aria-selected="true"] {
  background: var(--rt-primary);
  color: white;
  border-color: var(--rt-primary);
}

/* ===== Modal ===== */
dialog.rt-modal {
  max-width: 56rem;
  width: calc(100% - 2rem);
  max-height: 90vh;
  border: 0;
  border-radius: var(--rt-radius-card);
  padding: 0;
  background: white;
  color: var(--rt-foreground);
  display: flex;
  flex-direction: column;
}
dialog.rt-modal::backdrop {
  background: rgba(15, 23, 30, 0.6);
}
.rt-modal__header {
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--rt-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.rt-modal__header-text { min-width: 0; flex: 1; }
.rt-modal__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.rt-modal__sub {
  font-size: 0.875rem;
  color: var(--rt-muted);
  margin: 0;
}
.rt-modal__close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--rt-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--rt-radius-input);
}
.rt-modal__close:hover { background: var(--rt-surface); color: var(--rt-foreground); }

.rt-modal__layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
@media (min-width: 768px) {
  .rt-modal__layout { flex-direction: row; }
  .rt-modal__job {
    flex: 1 1 50%;
    overflow-y: auto;
    border-right: 1px solid var(--rt-border);
  }
  .rt-modal__form {
    flex: 1 1 50%;
    overflow-y: auto;
  }
}

.rt-modal__job {
  padding: 1.25rem 1.5rem;
}
.rt-modal__job-section {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rt-muted);
  margin: 0 0 0.5rem;
}
.rt-modal__job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.rt-modal__chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--rt-radius-pill);
  background: var(--rt-surface);
  color: var(--rt-foreground);
}
.rt-modal__chip--salary { background: rgba(30, 147, 218, 0.1); color: var(--rt-primary); }
.rt-modal__lead {
  font-size: 0.95rem;
  color: var(--rt-foreground);
  margin: 0 0 1rem;
  line-height: 1.55;
}
.rt-modal__html {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--rt-foreground);
}
.rt-modal__html > *:first-child { margin-top: 0; }
.rt-modal__html > *:last-child { margin-bottom: 0; }
.rt-modal__html p { margin: 0 0 0.75rem; }
.rt-modal__html ul,
.rt-modal__html ol {
  margin: 0 0 0.75rem 1.25rem;
  padding: 0;
}
.rt-modal__html li { margin: 0.25rem 0; }
.rt-modal__html strong { font-weight: 600; }
.rt-modal__html em { font-style: italic; }
.rt-modal__html a {
  color: var(--rt-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rt-modal__locations {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  background: var(--rt-surface);
  border-radius: var(--rt-radius-input);
  font-size: 0.85rem;
}
.rt-modal__locations-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.rt-modal__form {
  padding: 1rem 1.5rem 1.5rem;
}

.rt-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.rt-field { display: flex; flex-direction: column; gap: 0.35rem; }
.rt-field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.rt-label {
  font-size: 0.85rem;
  font-weight: 500;
}
.rt-required { color: var(--rt-secondary); }
.rt-input,
.rt-select,
.rt-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-input);
  background: white;
  font: inherit;
  color: inherit;
}
.rt-input:focus,
.rt-select:focus,
.rt-textarea:focus {
  outline: 2px solid var(--rt-primary);
  outline-offset: -1px;
  border-color: transparent;
}
.rt-input[disabled],
.rt-select[disabled] {
  background: var(--rt-surface);
  color: var(--rt-muted);
}
.rt-checkbox {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
}
.rt-checkbox input { margin-top: 0.2rem; }

.rt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.rt-btn {
  appearance: none;
  border: 0;
  font: inherit;
  padding: 0.6rem 1.25rem;
  border-radius: var(--rt-radius-pill);
  cursor: pointer;
}
.rt-btn--primary {
  background: var(--rt-primary);
  color: white;
}
.rt-btn--primary:hover { background: var(--rt-primary-hover); }
.rt-btn--primary:disabled { opacity: 0.6; cursor: not-allowed; }
.rt-btn--ghost {
  background: transparent;
  color: var(--rt-foreground);
  border: 1px solid var(--rt-border);
}

.rt-feedback {
  font-size: 0.875rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--rt-radius-input);
}
.rt-feedback--error {
  background: #fdecea;
  color: var(--rt-secondary);
}
.rt-feedback--success {
  background: #e6f4ea;
  color: #1a7f3c;
}

.rt-loading,
.rt-error {
  padding: 1.5rem;
  text-align: center;
  color: var(--rt-muted);
  font-size: 0.95rem;
}
