/* Hotelportal: Selbsteintrag, Kontobereich, Admin und Hotel-Detailseiten (/hotelportal/) */

/* styles.css setzt html und body auf overflow-x: hidden; damit wird body zum Scroll-Container
   und position: sticky (Unternavigation) greift nicht. clip schneidet ab, ohne zu scrollen. */
body.hp-page { overflow-x: clip; }

.hp-main { padding-bottom: var(--space-6); }

.hp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hp-block { display: flex; width: 100%; }
.hp-inline { display: inline; }
.hp-h3 { font-size: 1.4rem; margin-bottom: var(--space-3); }

.hp-header {
  background: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-5) 0 var(--space-4);
  margin-bottom: var(--space-5);
}

.hp-header h1 { font-size: clamp(1.75rem, 4vw, 2.8rem); margin-bottom: var(--space-2); }

.hp-breadcrumb { justify-content: flex-start; flex-wrap: wrap; margin-bottom: var(--space-3); }
.hp-breadcrumb a { color: var(--link-color); }

.hp-lead { font-size: 1.15rem; color: var(--text-light); max-width: 60ch; }

/* ---------- Meldungen ---------- */
.hp-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-container);
  border-left: 4px solid var(--success-color);
  background: #edf7ee;
  margin-bottom: var(--space-4);
}

.hp-alert-error { border-left-color: #c62828; background: #fdecea; }
.hp-alert-warning { border-left-color: var(--warning-color); background: #fff4e5; }
.hp-alert code { font-size: 1.1rem; user-select: all; }

/* ---------- Tabs im Konto/Admin ---------- */
.hp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--divider-color);
}

.hp-tabs a,
.hp-linkbtn {
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.hp-tabs a:hover { background: rgba(44, 95, 65, 0.08); }
.hp-tabs a[aria-current="page"] { background: var(--primary-color); color: #ffffff; }

.hp-linkbtn {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--link-color);
}

.hp-linkbtn:hover { text-decoration: underline; color: var(--link-hover); }

/* ---------- Formulare (AGENTS.md → Formulare) ---------- */
.hp-form {
  max-width: 600px;
  margin: 0 auto var(--space-5);
  padding: var(--space-4);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.hp-form-wide { max-width: 800px; }
.hp-form h2 { font-size: 1.4rem; margin: var(--space-4) 0 var(--space-3); }
.hp-form h2:first-of-type { margin-top: 0; }

.form-group { margin-bottom: var(--space-4); }

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-color);
}

.form-group input:not([type="checkbox"]),
.form-group textarea,
.form-group select,
.hp-tier-form select,
.hp-tier-form input,
.hp-image-alt input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--divider-color);
  border-radius: var(--radius-btn);
  font: inherit;
  font-size: 1rem;
  background: #ffffff;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.hp-tier-form select:focus,
.hp-tier-form input:focus,
.hp-image-alt input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
  border-color: var(--primary-color);
}

.form-group.error input,
.form-group.error textarea { border-color: #c62828; }

.hp-error {
  display: block;
  margin-top: var(--space-1);
  color: #c62828;
  font-size: 0.875rem;
}

.hp-hint { display: block; margin-top: var(--space-1); color: var(--text-light); font-size: 0.875rem; }

.hp-check { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2); align-items: start; }
.hp-check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--primary-color); }
.hp-check label { font-family: var(--font-primary); font-weight: 400; margin: 0; }
.hp-check .hp-error { grid-column: 2; }

.hp-hp { position: absolute; left: -9999px; }

.hp-form-foot { margin-top: var(--space-4); }

.hp-premium-fields {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.hp-premium-fields legend { font-family: var(--font-display); font-weight: 600; padding: 0 var(--space-2); }
.hp-premium-fields:disabled { background: var(--secondary-color); }
.hp-premium-fields:disabled input,
.hp-premium-fields:disabled textarea { background: #f0f0f0; cursor: not-allowed; }

.hp-row { display: grid; grid-template-columns: 1fr; gap: 0 var(--space-4); }

.hp-btn-danger { background: #ffffff; color: #c62828; border: 2px solid #c62828; }
.hp-btn-danger:hover { background: #c62828; color: #ffffff; }

/* ---------- Eintragsarten ---------- */
.hp-plans { margin-bottom: var(--space-5); }
.hp-plan ul { margin: 0 0 var(--space-3) 1.25rem; }
.hp-plan li { margin-bottom: var(--space-1); }
.hp-plan-premium { border: 2px solid var(--primary-color); }

.hp-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-4); }
.hp-dl dt { font-family: var(--font-display); font-weight: 600; }
.hp-dl dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Bilder verwalten ---------- */
.hp-images {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  padding: 0;
}

.hp-image img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-img); margin-bottom: var(--space-3); }
.hp-image-alt { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.hp-image-alt label { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.hp-image-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.hp-room-form { max-width: 800px; margin: 0 auto var(--space-4); }

/* ---------- Admin ---------- */
.hp-admin-hotel { margin-bottom: var(--space-4); }
.hp-admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.hp-admin-head h2 { margin: 0; margin-right: auto; }
.hp-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.hp-tier-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.hp-tier-form select,
.hp-tier-form input { width: auto; padding: 0.4rem 0.6rem; }
.hp-tier-form label { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; }

/* ---------- Öffentliche Hotelseite ---------- */
.hp-hotel-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  margin-bottom: var(--space-5);
  background: var(--primary-hover);
}

.hp-hotel-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-hotel-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.1) 60%); }
.hp-hotel-hero-plain { min-height: 30vh; }
.hp-hotel-hero-plain::after { display: none; }

.hp-hotel-hero-content { position: relative; z-index: 1; padding-top: var(--space-6); padding-bottom: var(--space-5); }
.hp-hotel-hero h1 { color: #ffffff; margin-bottom: var(--space-2); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.hp-hotel-hero .hp-breadcrumb a,
.hp-hotel-hero .hp-breadcrumb span { color: rgba(255, 255, 255, 0.9); }

.hp-hotel-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-family: var(--font-display); font-weight: 600; }
.hp-stars { color: #ffd54f; letter-spacing: 2px; }

.hp-hotel-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-5); margin-bottom: var(--space-5); }
.hp-hotel-body section { margin-bottom: var(--space-5); }
.hp-hotel-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-3); }
.hp-hotel-body p { margin-bottom: var(--space-3); line-height: 1.7; }

.hp-gallery { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin: 0; padding: 0; }
.hp-gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-img); transition: var(--transition); }
.hp-gallery a:hover img,
.hp-gallery a:focus-visible img { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

.hp-keywords { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }

.hp-hotel-contact { align-self: start; }
.hp-hotel-contact address { font-style: normal; margin-bottom: var(--space-3); line-height: 1.6; }
.hp-hotel-contact p { margin-bottom: var(--space-2); overflow-wrap: anywhere; }
.hp-owner-note { margin-top: var(--space-3); }

/* ---------- Premium-Hotelseite: Werte aus den Inline-Styles von unterkuenfte/hotel/walliserhof/ ---------- */
.hp-premium { padding-bottom: 5rem; }

.hp-ba-hero { position: relative; height: 52vh; min-height: 380px; overflow: hidden; background: var(--primary-hover); }
.hp-ba-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hp-ba-hero img.active { opacity: 1; }
.hp-ba-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 55%); }
.hp-ba-hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem clamp(1.5rem, 5vw, 4rem); color: #ffffff; }
.hp-ba-hero-content h1 { color: #ffffff; margin: 0.5rem 0; font-size: clamp(1.75rem, 4vw, 2.75rem); }
.hp-ba-hero-content .breadcrumb { justify-content: flex-start; color: rgba(255, 255, 255, 0.85); margin-bottom: 0; }
.hp-ba-hero-content .breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.hp-ba-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hp-ba-badges .badge { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3); color: #ffffff; }

.hp-ba-subnav { position: sticky; top: var(--topbar-height); z-index: 40; background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border)); }
.hp-ba-subnav-inner { max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); display: flex; gap: 1.5rem; overflow-x: auto; }
.hp-ba-subnav a { padding: 0.9rem 0; font-size: 0.9rem; font-weight: 600; color: hsl(var(--muted-foreground)); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.hp-ba-subnav a:hover { color: hsl(var(--foreground)); }
.hp-ba-subnav a:focus-visible { color: hsl(var(--foreground)); border-bottom-color: var(--primary-color); }

.hp-ba-body { padding-top: 2rem; }
.hp-ba-body h2 { margin-bottom: 1rem; }
.hp-ba-section { margin-bottom: 2.5rem; scroll-margin-top: calc(var(--topbar-height) + 3.5rem); }

.hp-ba-overview { max-width: 760px; }
.hp-ba-overview p { font-size: 0.98rem; line-height: 1.75; color: hsl(var(--muted-foreground)); }
.hp-ba-overview p + p,
.hp-ba-overview .hp-keywords { margin-top: 0.75rem; }

.hp-ba-gallery-strip { display: flex; gap: 0.6rem; overflow-x: auto; list-style: none; margin: 0; padding: 0 0 0.5rem; }
.hp-ba-gallery-strip li { flex-shrink: 0; }
.hp-ba-gallery-strip img { height: 160px; width: auto; border-radius: 0.6rem; object-fit: cover; }

.hp-premium .card { border: 1px solid hsl(var(--border)); border-radius: 1rem; overflow: hidden; background: hsl(var(--background)); padding: 1.1rem; }
.hp-premium .card h3,
.hp-premium .card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; }
.hp-premium .card p,
.hp-premium .card address { font-size: 0.85rem; font-style: normal; color: hsl(var(--muted-foreground)); }
.hp-ba-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem; }

.hp-ba-room-grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.hp-ba-room-card { border: 1px solid hsl(var(--border)); border-radius: 1rem; overflow: hidden; background: hsl(var(--background)); }
.hp-ba-room-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hp-ba-room-card-body { padding: 1.25rem; }
.hp-ba-room-card-body h3 { margin-bottom: 0.4rem; }
.hp-ba-room-card-body p,
.hp-ba-room-card-body ul { color: hsl(var(--muted-foreground)); font-size: 0.9rem; }
.hp-ba-room-card-body ul { padding-left: 1.1rem; margin-top: 0.5rem; }

.hp-ba-activity-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.hp-ba-activity-tab { padding: 0.55rem 1.1rem; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: 9999px; font-weight: 500; font-size: 0.85rem; color: inherit; cursor: pointer; }
.hp-ba-activity-tab[aria-selected="true"] { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #ffffff; }
.hp-ba-activity-panel + .hp-ba-activity-panel { margin-top: 1.25rem; }
.hp-ba-panel-label { font-size: 1.05rem; margin-bottom: 0.75rem; }
.hp-tabs-ready .hp-ba-panel-label { display: none; }
.hp-tabs-ready .hp-ba-activity-panel + .hp-ba-activity-panel { margin-top: 0; }

.hp-ba-amenity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.hp-ba-amenity-grid li { display: flex; gap: 0.6rem; padding: 0.9rem; border: 1px solid hsl(var(--border)); border-radius: 0.75rem; background: hsl(var(--background)); font-size: 0.85rem; }
.hp-ba-amenity-grid strong { display: block; font-size: 0.85rem; }
.hp-ba-amenity-grid .sub { color: hsl(var(--muted-foreground)); font-size: 0.78rem; }

.hp-ba-pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.hp-ba-pill-row li { padding: 0.5rem 1rem; border: 1px solid hsl(var(--border)); border-radius: 999px; font-size: 0.85rem; background: hsl(var(--background)); }

.hp-ba-lage { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.hp-ba-lage h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.hp-ba-lage h3 + .hp-list + h3 { margin-top: 1rem; }
.hp-ba-lage .btn { width: 100%; }
.hp-ba-lage-address { font-size: 0.85rem; color: hsl(var(--muted-foreground)); margin-top: 0.5rem; }
.hp-list { list-style: none; padding-left: 0; font-size: 0.9rem; }
.hp-list li { position: relative; padding: 0.2rem 0 0.2rem 1.1rem; color: hsl(var(--muted-foreground)); }
.hp-list li::before { content: "•"; position: absolute; left: 0; color: hsl(var(--primary)); font-weight: bold; }
.hp-list strong { color: hsl(var(--foreground)); }

.hp-ba-disclosure { font-size: 0.72rem; color: hsl(var(--muted-foreground)); text-align: center; padding: 0.9rem; background: hsl(var(--muted) / 0.3); border-radius: 0.5rem; margin-top: 1.5rem; }

.hp-ba-floating-cta { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 100; background: hsl(var(--foreground)); color: hsl(var(--background)); border-radius: 999px; padding: 0.6rem 0.6rem 0.6rem 1.25rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.hp-ba-floating-cta span { font-size: 0.85rem; opacity: 0.85; }
.hp-ba-floating-cta a { color: hsl(var(--background)); text-decoration: none; font-weight: 700; background: hsl(var(--accent)); padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.85rem; white-space: nowrap; }

/* Unter 1024px sitzt rechts unten der Menü-Button (.menu-fab, ca. 115px breit, 1.5rem Abstand) */
@media (max-width: 1023px) {
  .hp-ba-floating-cta { left: 1rem; right: 9.25rem; bottom: 1.5rem; transform: none; justify-content: space-between; }
}

@media (max-width: 640px) {
  .hp-ba-floating-cta { padding-left: 0.6rem; }
  .hp-ba-floating-cta span { display: none; }
  .hp-ba-floating-cta a { flex: 1; text-align: center; }
}

@media (min-width: 601px) {
  .hp-ba-room-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 700px) {
  .hp-ba-amenity-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 901px) {
  .hp-ba-room-grid { grid-template-columns: repeat(3, 1fr); }
}

.hp-check-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.hp-check-grid .hp-check { margin-bottom: 0; }

.hp-item-form { display: grid; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--divider-color); }
.hp-item-form .form-group { margin-bottom: 0; }
.hp-item-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hp-room-thumb { width: 100%; max-width: 320px; height: auto; border-radius: var(--radius-img); margin-bottom: var(--space-2); }

@media (prefers-reduced-motion: reduce) {
  .hp-ba-hero img { transition: none; }
}

@media (min-width: 600px) {
  .hp-check-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .hp-form { padding: var(--space-5); }
  .hp-item-form { grid-template-columns: 2fr 3fr 6rem auto; align-items: end; }
  .hp-row { grid-template-columns: 1fr 1fr; }
  .hp-images { grid-template-columns: repeat(2, 1fr); }
  .hp-gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .hp-images { grid-template-columns: repeat(3, 1fr); }
  .hp-hotel-layout { grid-template-columns: 2fr 1fr; }
  .hp-hotel-contact { position: sticky; top: var(--space-4); }
  .hp-ba-subnav { top: 0; }
  .hp-ba-section { scroll-margin-top: 3.5rem; }
  .hp-check-grid { grid-template-columns: repeat(3, 1fr); }
}
