/*
 * HNT.ROCKS – globale 10px-Radius-Schicht
 *
 * Diese Datei ändert ausschließlich border-radius-Werte. Sie wird über den
 * gemeinsamen HNT-Header geladen und ist dadurch vollständig rückbaubar:
 * Zum Zurücksetzen genügt es, die eine Link-Zeile im Header-Partial wieder zu
 * entfernen. Bestehende Seiten-CSS, Layouts und Komponenten bleiben erhalten.
 */

:root {
  --hnt-global-surface-radius: 10px;
}

/* Große und mittlere Oberflächen: Karten, Panels, Widgets und Overlays. */
:where(
  [class~="card"],
  [class*="-card "],
  [class$="-card"],
  [class~="panel"],
  [class*="-panel "],
  [class$="-panel"],
  [class~="widget"],
  [class*="-widget "],
  [class$="-widget"],
  [class~="dropdown"],
  [class*="-dropdown "],
  [class$="-dropdown"],
  [class~="modal"],
  [class*="-modal "],
  [class$="-modal"],
  [class~="dialog"],
  [class*="-dialog "],
  [class$="-dialog"],
  [class~="sheet"],
  [class*="-sheet "],
  [class$="-sheet"],
  [class~="popover"],
  [class*="-popover "],
  [class$="-popover"],
  [class~="toolbar"],
  [class*="-toolbar "],
  [class$="-toolbar"],
  [class~="preview"],
  [class*="-preview "],
  [class$="-preview"],
  [class~="notice"],
  [class*="-notice "],
  [class$="-notice"],
  [class~="alert"],
  [class*="-alert "],
  [class$="-alert"]
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Gemeinsamer Header. Runde Icon-Schaltflächen werden weiter unten bewahrt. */
:where(
  .main-nav,
  .main-nav > a,
  .main-nav > .main-nav-item > .main-nav-trigger,
  .main-nav-trigger.main-nav-direct,
  .settings-button,
  .mobile-stats-trigger,
  .header-dropdown,
  .main-nav-dropdown,
  .hnt-comms-overview,
  .hnt-chat-tab
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Häufige innere Flächen, die nicht als „Card“ benannt sind. */
:where(
  .header-live-state,
  .header-request-item,
  .header-message-item,
  .header-notification-item,
  .hnt-agenda-card,
  .personal-progress-row,
  .activity-item,
  .composition-stat-grid article,
  .guide-featured,
  .guide-empty,
  .guide-pagination,
  .guide-category-list button,
  .guide-status-widget article,
  .team-member-row,
  .team-request-row,
  .team-session-row,
  .rocks-transaction-row,
  .rocks-inventory-item,
  .gamification-quest-row,
  .gamification-history-row
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Normale Formularflächen. Native/runde Controls bleiben unangetastet. */
:where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
  select,
  textarea
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Zweiter visueller Durchgang: konkrete Live-Komponenten, deren Seiten-CSS
   eigene Radien mit höherer Spezifität setzt. Es werden weiterhin nur Radien
   überschrieben; Layout, Abstände, Farben und Größen bleiben unverändert. */

/* Feed- und Moments-Kommentare. */
body :is(
  .comments-modal,
  .comments-post-context,
  .comment-bubble,
  .comments-input-shell,
  .real-comment-dialog__card,
  .real-comment-menu
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Maps-Übersicht. */
body[data-page="maps"] :is(
  .maps-stage,
  .maps-view-switch,
  .map-plan-card,
  .map-plan-art,
  .map-plan-content,
  .maps-feature-overview,
  .maps-marker-grid > article,
  .maps-feature-detail-grid > article,
  .maps-bottom-note,
  .maps-workflow,
  .maps-workflow-steps > article,
  .maps-community-main,
  .maps-community-side,
  .maps-community-numbers > article,
  .maps-help-section,
  .maps-help-rows > article
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Interaktive Map-Detailseite. */
body[data-page="map-detail"] :is(
  .map-switch-card,
  .map-filter-card,
  .map-layer-card,
  .map-switch-item,
  .map-detail-center,
  .map-canvas-toolbar,
  .map-canvas-frame,
  .map-canvas-surface,
  .map-live-error,
  .hnt-map-lightbox-panel,
  .hnt-map-cash-submission-panel
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Guide-Detail. */
body.guides-detail-live :is(
  .guide-preview-banner,
  .guide-detail-cover,
  .guide-detail-hero > aside > article,
  .guide-detail-actions,
  .guide-detail-toc > section,
  .guide-version-card,
  .guide-article,
  .guide-article-end,
  .guide-detail-sidebar > section,
  .guide-related article,
  .guide-block-callout,
  .guide-step,
  .guide-detail-report-menu form
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Moments-Feed und Erstellen-Dialog. */
body[data-page="moments"] :is(
  .moments-stage,
  .moments-floating-head,
  .moment-video-card,
  .moments-empty-real,
  .moments-filter-empty,
  [role="dialog"],
  .moment-create-modal,
  .moment-create-dialog,
  .moment-create-panel,
  .moment-create-upload,
  .moment-create-dropzone,
  .moment-create-format,
  .moment-create-crosspost,
  .hh-moment-create-drop,
  .hh-moment-create-cover
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Cups-Übersicht. */
body[data-page="cups"] :is(
  .cups-center-card,
  .cups-featured,
  .cups-featured-cover,
  .cups-featured-copy,
  .cups-section,
  .cup-highlight-card,
  .cup-highlight-art,
  .cup-highlight-content,
  .cups-empty-state,
  .cups-my-card,
  .cups-my-cover,
  .cups-my-content,
  .cups-timeline-card,
  .cups-hall-card,
  .cups-hub-card
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Cup-Detail. */
body[data-page="cup-detail"] :is(
  .cup-white-card,
  .cup-progress-card,
  .cup-scoring-card,
  .cup-section-card,
  .cup-team-modal__panel,
  .cup-detail-left > article,
  .cup-detail-right > article,
  [class*="cup-"][class$="-card"]
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Mitgliederverzeichnis. */
body[data-page="members"] :is(
  .members-directory-card,
  .members-table-row,
  .members-empty-state,
  .members-alert,
  .members-mobile-filter-modal
) {
  border-radius: var(--hnt-global-surface-radius) !important;
}

/* Bewusst runde Elemente dürfen durch die globale Schicht nicht eckig werden. */
:where(
  .header-circle,
  .circle-button,
  .profile-settings,
  .post-more,
  .comments-close,
  .comments-send,
  .real-comment-more,
  .hnt-comms-launcher,
  .moment-sound-toggle,
  .moment-play-toggle,
  .moment-follow-button,
  .member-avatar,
  .member-row-actions a,
  .member-row-actions button,
  .members-shelf-icon,
  [class~="avatar"],
  [class*="-avatar "],
  [class$="-avatar"],
  [class~="badge"],
  [class*="-badge "],
  [class$="-badge"],
  [class~="chip"],
  [class*="-chip "],
  [class$="-chip"],
  [class~="pill"],
  [class*="-pill "],
  [class$="-pill"],
  [class~="status"],
  [class*="-status "],
  [class$="-status"],
  [class~="ring"],
  [class*="-ring "],
  [class$="-ring"],
  [class~="dot"],
  [class*="-dot "],
  [class$="-dot"]
) {
  border-radius: 999px !important;
}

/* Nur die vier Icon-Aktionen rechts neben „Einstellungen“ sind echte Kreise. */
header.site-header[data-hnt-shared-header] .header-actions > .header-action-menu:not(.settings-menu) {
  height: 100%;
  display: grid;
  place-items: center;
}

header.site-header[data-hnt-shared-header] .header-actions > .header-action-menu:not(.settings-menu) > .header-circle {
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  border-radius: 50% !important;
}