/* =====================================================================
   retreva Partner: WordPress integration of the reference partner.css.
   Markup from the Retreva add-on (hotel-portal/class-partner-*.php).
   ===================================================================== */
.rt-partner-body { margin: 0; }
.rt-partner-body .rt-p__brand b { font-family: var(--ff-head); font-size: 22px; color: #fff; }

/* Older add-on views (wizard, account forms) use these variables; map them onto the tokens. */
.rt-p {
  --main-color: var(--c-navy);
  --link-color: var(--c-ink);
  --grey-color: var(--c-muted);
  --light-grey-color: var(--c-surface-2);
}

/* WordPress admin bar (administrators only; hotel accounts never see it). */
.admin-bar .rt-p__side { top: var(--wp-admin--admin-bar--height, 32px); height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)); }
.admin-bar .rt-p__top { top: var(--wp-admin--admin-bar--height, 32px); }
.rt-p-adminbar { margin: 0; padding: 8px 32px; background: var(--c-warning-bg); color: var(--c-warning-text); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--c-line); }

/* The hotel switcher is a link back to "Meine Unterkünfte" (reference: button). */
.rt-p__hotel { text-decoration: none; }
.rt-p__hotel:hover { background: rgba(255,255,255,.12); }
.rt-p__hotel:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.rt-p__brand:focus-visible, .rt-p__hotel:focus-visible, .rt-p__nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Sign-out sits at the bottom of the sidebar, separated from the navigation. */
.rt-p__logout { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: auto; padding: 0 12px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; color: var(--c-on-navy-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.rt-p__help ~ .rt-p__logout { margin-top: 0; }
.rt-p__logout:hover { color: #fff; }
.rt-p__logout:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* The reference sync chip is an action; here it only names the data source. */
.rt-p__source { cursor: default; }
.rt-p__top .rt-p__link { margin-left: auto; }
.rt-p__top .rt-p__avatar { margin-left: 0; }
.rt-p__top:not(:has(.rt-p__link)) .rt-p__avatar { margin-left: auto; }

.rt-p-card__title { font-size: 20px; margin: 0 0 14px; }
.rt-p-card__note { margin: 14px 0 0; font-size: 14px; color: var(--c-muted); }
.rt-p-card--flush { padding: 0; overflow: hidden; }
.rt-p-card .rt-p-dl + .rt-btn, .rt-p-card .rt-p-card__note + .rt-btn { margin-top: 16px; }
.rt-p-percent { font-family: var(--ff-head); font-size: 24px; }
.rt-p-ico--ok { background: var(--c-success); }
.rt-p-ico--warn { background: var(--c-warning); }
.rt-p-empty { margin: 0; padding: 22px 24px; color: var(--c-muted); }

/* Lists */
.rt-p-room img { display: block; }
.rt-p-inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rt-p-inline-form .rt-field { flex: 1 1 280px; }
.rt-p-hotels { display: grid; gap: 16px; }
.rt-p-hotel { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.rt-p-hotel img, .rt-p-hotel .rt-p-noimg { width: 120px; height: 90px; border-radius: var(--r-md); object-fit: cover; }
.rt-p-hotel h2 { font-size: 20px; margin: 0 0 4px; }
.rt-p-hotel p { margin: 0 0 8px; }

/* Editor */
.rt-p-edit__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rt-p-fields { display: flex; flex-direction: column; gap: 18px; }
.rt-p-rte__source { display: block; width: 100%; min-height: 220px; padding: 14px 16px; border: 0; font: inherit; line-height: 1.6; color: var(--c-text-2); background: transparent; resize: vertical; box-sizing: border-box; }
.rt-p-rte__source[readonly] { display: none; }
.rt-p-rte__area:focus-visible, .rt-p-rte__source:focus-visible { outline: 2px solid var(--c-link); outline-offset: -2px; }
.rt-p-rte__area ul { margin: 0 0 8px; padding-left: 22px; }
.rt-p-rte__bar button[aria-pressed="true"] { background: var(--c-surface-2); }
.rt-p-rte__bar button:focus-visible { outline: 2px solid var(--c-link); outline-offset: 1px; }
.rt-p-teaser { min-height: 96px; }
.rt-p-dl--data { grid-template-columns: 140px minmax(0, 1fr); }
.rt-p-dl--data dt { display: flex; align-items: center; gap: 6px; }
.rt-p-alt-missing { color: var(--c-warning-text); font-weight: 600; }
.rt-p-preview { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 14px; }
.rt-p-preview img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.rt-p-preview > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.rt-p-preview b { font-family: var(--ff-head); font-size: 17px; }
.rt-p-preview__price { margin-top: 6px; font-weight: 700; color: var(--c-ink); }
.rt-p-savebar span.is-dirty { color: var(--c-warning-text); }

/* Admin full view: banner with a switch to the hotel's own view. */
.rt-p-adminbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.rt-p-adminbar a { color: inherit; font-weight: 700; }
.rt-p-override { margin: -4px 0 16px; }
/* Synced texts: per-field badge and switch as in reference partner/zimmer-bearbeiten (.rt-p-fieldhead). */
.rt-p-fieldhead .rt-label { margin-bottom: 0; }
.rt-p-fieldhead .rt-btn--link { min-height: 0; padding: 0; }
.rt-p-teaser[readonly] { background: var(--c-bg); border-style: dashed; border-color: var(--c-line-strong); }
.rt-p-origin { margin-top: 8px; font-size: 14px; }
.rt-p-origin summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--c-link); font-weight: 700; cursor: pointer; }
.rt-p-origin summary:hover { color: var(--c-ink); }
.rt-p-origin summary:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.rt-p-origin__text { margin-top: 6px; padding: 12px 14px; background: var(--c-surface-2); border-radius: var(--r-md); color: var(--c-text-2); line-height: 1.6; }
.rt-p-origin__text > :last-child { margin-bottom: 0; }
.rt-p-origin__text h3 { margin: 0 0 6px; font-size: 16px; color: var(--c-ink); }
.rt-p-origin__text p, .rt-p-origin__text ul { margin: 0 0 8px; }

/* Statistics: period switch as links (server-rendered), table alternative to the chart. */
.rt-seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--c-ink); text-decoration: none; }
.rt-seg a:hover { background: var(--c-surface-2); }
.rt-seg a[aria-current="true"] { background: var(--c-navy); color: #fff; }
.rt-seg a:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.rt-p-details { margin-top: 12px; }
.rt-p-details > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--c-ink); }
.rt-p-details[open] > summary { margin-bottom: 8px; }
.rt-p-table--compact th, .rt-p-table--compact td { white-space: normal; }
.rt-p-table--compact th small { display: block; font-weight: 400; color: var(--c-muted); font-size: 13px; }
.rt-p-table--compact td { text-align: right; font-weight: 700; }
.rt-p-empty--inline { padding: 0; }
.rt-p-card .rt-caption { margin: 12px 0 0; }

/* Wizard and account views inside the frame: the frame owns navigation and page title. */
.rt-p .retreva-hotel-wizard { max-width: none; margin: 0; padding: 0; }
.rt-p .retreva-hotel-wizard__back, .rt-p .retreva-hotel-wizard__areas { display: none; }
.rt-p .retreva-hotel-account { max-width: none; margin: 0; padding: 22px 24px; }
.rt-p details.retreva-hotel-account__add-hotel { margin: 0; padding: 0; }
.rt-p .retreva-hotel-account__add-hotel > summary { display: flex; align-items: center; min-height: 64px; padding: 0 24px; border: 0; border-radius: inherit; background: none; color: var(--c-ink); font-weight: 700; cursor: pointer; }
.rt-p .retreva-hotel-account__add-hotel > summary:hover { color: var(--c-navy); text-decoration: underline; text-underline-offset: 3px; }
.rt-p .retreva-hotel-account__add-hotel[open] { padding: 0 24px 24px; }
.rt-p .retreva-hotel-account__add-hotel[open] > summary { padding: 0; }

@media (max-width: 1023px) {
  .rt-p-adminbar { padding: 8px 16px; }
  /* The hotel link is hidden here (reference), so the avatar takes the free space. */
  .rt-p__top .rt-p__avatar { margin-left: auto; }
}
@media (max-width: 599px) {
  .rt-p-hotel { grid-template-columns: 1fr; }
  .rt-p-hotel img, .rt-p-hotel .rt-p-noimg { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .rt-p-dl--data { grid-template-columns: minmax(0, 1fr); }
}
