/* Repeated controls share geometry, not a universal skin. Filled action paint is
   owned by action-theme.css. Category pills, badges, avatars, tab underlines,
   segmented inner buttons and promotion-choice cards keep their own shapes. */
:root {
  --outlo-control-radius: 12px;
  --outlo-control-radius-compact: 8px;
  --outlo-control-height: 44px;
  --outlo-control-height-large: 48px;
  --outlo-control-height-compact: 36px;
  --outlo-control-padding-block: 10px;
  --outlo-control-padding-inline: 14px;
  --outlo-control-padding-block-compact: 7px;
  --outlo-control-padding-inline-compact: 12px;
  --outlo-field-label-gap: 6px;
  --outlo-field-label-gap-compact: 4px;
  --outlo-form-field-gap: 16px;
  --outlo-form-field-gap-compact: 12px;
  --outlo-form-section-gap: 24px;
  --outlo-surface-radius-workspace: 12px;
  --outlo-control-focus: #a5b4fc;
}

/* Public form/action family. Auth deliberately retains its roomier 48px height;
   the miniature editor preview and inline text links are not real form actions. */
.personal-center .pc-layout .pc-button,
.personal-center .pc-profile-card .pc-header-actions .pc-button,
.auth-modern :is(.auth-primary, .auth-google-button, .auth-google-cancel),
:is(.fo-shell, .fo-dialog) .fo-button,
.search-results-page :is(.rs-primary, .rs-secondary, .rs-filter-open),
.search-results-page .rs-event-actions > a,
.public-organizer-page .public-organizer-actions .button-link,
#eventDialog.event-editor[data-editor-mode] .event-form-actions button,
#eventDialog.event-editor[data-editor-mode] #confirmLocationButton,
#editorDiscardDialog .editor-confirm-actions button,
#organizerRequestDialog .dialog-actions button,
#accountAccessDialog .dialog-actions > a,
#reportDialog .dialog-actions button,
.feedback-dialog :is(.feedback-cancel, .feedback-submit),
#detailPanel .detail-action-block :is(.button-link, .detail-secondary-actions > button) {
  border-radius: var(--outlo-control-radius);
}

/* Standalone public controls use a common baseline. In-button icon placement,
   text wrapping, theme colors, loading and disabled states stay component-owned. */
.search-results-page .rs-event-actions > a,
.public-organizer-page .public-organizer-actions .button-link,
#eventDialog.event-editor[data-editor-mode] :is(.event-form-actions button, #confirmLocationButton),
#organizerRequestDialog .dialog-actions button,
#reportDialog .dialog-actions button {
  min-height: var(--outlo-control-height);
}

/* Text-like inputs only: never resize a radio, switch, file input, slider or
   checkbox. Auth 48px, public 44px and denser desktop workspace fields are intentional. */
.auth-modern .auth-field input,
.personal-center .pc-form :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=hidden]), select, textarea),
.fo-search-field input,
.fo-sort select,
.search-results-page :is(.rs-filter-fields input:not([type=checkbox]):not([type=radio]):not([type=range]), .rs-filter-fields select, .rs-sort select, .rs-type-mobile select),
#eventDialog.event-editor[data-editor-mode] :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=hidden]), select, textarea) {
  border-radius: var(--outlo-control-radius);
}

/* Operational controls are purposefully more compact, but not arbitrarily square.
   These named action areas exclude navigation, tabs, badges and selectable cards. */
body.admin-shell-page.admin-modern :is(.admin-toolbar, .admin-commandbar, .organizer-toolbar, .organizer-work-actions, .team-actions, .pager-actions, .ass-actions, .ams-actions, .aos-actions, .api-actions, .asw-savebar, .request-review-actions) > :is(button, a.button-link),
body.admin-shell-page.admin-modern .row-actions > :is(button, a),
body.admin-shell-page.admin-modern .action-menu > summary,
body.admin-shell-page.admin-modern .action-menu-panel > :is(button, a),
body.admin-shell-page.admin-modern dialog:not(.promotion-composer) .dialog-actions > :is(button, a.button-link),
body.admin-shell-page.admin-modern .organizer-create-button {
  border-radius: var(--outlo-control-radius-compact) !important;
}

/* The events-date fields have an older ID-scoped radius reset. Match that
   ownership explicitly rather than making all workspace fields important. */
body.admin-shell-page.admin-modern #view-events .admin-filter-date input {
  border-radius: var(--outlo-control-radius-compact);
}

body.admin-shell-page.admin-modern .row-actions > :is(button, a),
body.admin-shell-page.admin-modern .action-menu > summary {
  /* The legacy table stylesheet hard-codes 30px with !important. Restrict
     the correction to real operational row actions, never generic buttons. */
  height: var(--outlo-control-height-compact) !important;
  min-height: var(--outlo-control-height-compact) !important;
}
body.admin-shell-page.admin-modern .action-menu > summary {
  width: var(--outlo-control-height-compact) !important;
}

/* Settings save/reset actions share one prominent footer size, even when
   their underlying section styles supply different primary/secondary padding. */
body.admin-shell-page.admin-modern .asw-savebar :is(button, a.button-link) {
  min-height: var(--outlo-control-height);
  height: auto;
  padding-block: var(--outlo-control-padding-block);
  padding-inline: var(--outlo-control-padding-inline);
}

/* Location is the same standalone action on the map and in the catalogue.
   Clear fields, category choices and the map's compact controls stay separate. */
.map-page .filter-actions #useLocation {
  min-height: var(--outlo-control-height);
  padding-block: var(--outlo-control-padding-block);
  padding-inline: var(--outlo-control-padding-inline);
  border-radius: var(--outlo-control-radius);
}

/* Public map fields match the catalogue. Keep the navigation search and
   composed map-address picker out of this standalone-field family. */
.map-page #mapFilterPanel :is(#mainSearchInput, #originInput) {
  min-height: var(--outlo-control-height);
  border-radius: var(--outlo-control-radius);
}

/* Both public reporting flows use ordinary form fields, not compact toolbar
   filters. Multiline descriptions retain their own height and resizing. */
#reportDialog :is(select, textarea),
#reportDialog #reportSourceUrl,
#searchReportDialog :is(select, textarea) {
  border-radius: var(--outlo-control-radius);
}
#reportDialog select,
#reportDialog #reportSourceUrl,
#searchReportDialog select {
  min-height: var(--outlo-control-height);
}
#searchReportDialog label:has(> :is(input:where(:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color])), select, textarea)) {
  row-gap: var(--outlo-field-label-gap);
}
#searchReportDialog .form-grid {
  gap: var(--outlo-form-field-gap);
}

body.admin-shell-page.admin-modern :is(.admin-toolbar, .admin-commandbar, .organizer-context-bar, .organizer-toolbar, .inline-form, .organizer-profile-form, .ass-fields, .ass-pin-fields, .ams-fields, .aos-fields, .api-fields, .form-grid) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=hidden]), select, textarea),
body.admin-shell-page.admin-modern .pager-size select {
  border-radius: var(--outlo-control-radius-compact);
}

/* Organizer has a legacy important toolbar radius; scope the override to those
   two ordinary fields, not the workspace's pills or promotion choices. */
body.admin-shell-page.admin-modern.organizer-modern .organizer-toolbar :is(input, select) {
  border-radius: var(--outlo-control-radius-compact) !important;
}

/* Dialog close buttons are a separate icon family. Standalone closes are 44px;
   embedded password-reveal buttons retain the smaller inner-field radius. */
.personal-center .pc-layout .pc-dialog-close,
:is(.fo-shell, .fo-dialog) .fo-icon-button,
#eventDialog.event-editor[data-editor-mode] .dialog-head .icon-button,
#organizerRequestDialog .dialog-head .icon-button,
#accountAccessDialog .dialog-head .icon-button,
#reportDialog .dialog-head .icon-button,
.feedback-dialog .feedback-dialog-close,
body :is(#promotionConfirmDialog, #organizerPromotionConfirmDialog).promotion-composer.promotion-composer .dialog-head .icon-button,
body.admin-shell-page.admin-modern dialog .dialog-head .icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--outlo-control-height);
  width: var(--outlo-control-height);
  height: var(--outlo-control-height);
  min-height: var(--outlo-control-height);
  padding: 0;
  border-radius: var(--outlo-control-radius);
}

/* Keep the account gate's decorative symbol column, but reserve a full close
   control column instead of letting the 44px button overflow its old 36px slot. */
#accountAccessDialog .dialog-head {
  grid-template-columns: 52px minmax(0, 1fr) var(--outlo-control-height);
}
@media (max-width: 560px) {
  #accountAccessDialog .dialog-head {
    grid-template-columns: 46px minmax(0, 1fr) var(--outlo-control-height);
  }
}

.auth-modern .auth-eye,
.personal-center .pc-layout .pc-password-toggle,
.fo-search-field > .fo-icon-button {
  border-radius: var(--outlo-control-radius-compact);
}

/* Match native file-selector geometry without changing the upload hit area. */
#eventDialog.event-editor[data-editor-mode] input[type=file]::file-selector-button {
  border-radius: var(--outlo-control-radius);
}

/* Quiet secondary actions have a shared indigo response; primary gradients,
   selected save/follow controls and danger/success actions retain their own paint. */
@media (hover: hover) {
  .personal-center .pc-layout :is(.pc-button-secondary, .pc-button-ghost):not(:disabled):not([aria-disabled=true]):hover,
  :is(.fo-shell, .fo-dialog) .fo-secondary:not(:disabled):not([aria-disabled=true]):hover,
  .search-results-page .rs-secondary:not(:disabled):not([aria-disabled=true]):hover,
  #eventDialog.event-editor[data-editor-mode] .event-form-actions .ghost:not(:disabled):hover {
    background: var(--outlo-brand-soft, #eef2ff);
    border-color: var(--outlo-brand-border, #c7d2fe);
    color: var(--outlo-brand-text-hover, #3730a3);
  }
}

/* A stable, visible focus cue is shared only by standalone controls. Composite
   picker focus and invalid-field error rings keep their existing treatments. */
.personal-center .pc-layout :is(.pc-button, .pc-dialog-close):focus-visible,
.auth-modern :is(.auth-primary, .auth-google-button, .auth-google-cancel):focus-visible,
:is(.fo-shell, .fo-dialog) :is(.fo-button, .fo-icon-button):focus-visible,
.search-results-page :is(.rs-primary, .rs-secondary):focus-visible,
.feedback-dialog :is(.feedback-dialog-close, .feedback-cancel, .feedback-submit):focus-visible,
#accountAccessDialog .dialog-head .icon-button:focus-visible,
body :is(#promotionConfirmDialog, #organizerPromotionConfirmDialog).promotion-composer.promotion-composer .dialog-head .icon-button:focus-visible,
#eventDialog.event-editor[data-editor-mode] :is(.event-form-actions button, .dialog-head .icon-button, #confirmLocationButton):focus-visible,
body.admin-shell-page.admin-modern :is(.row-actions > button, .row-actions > a, .action-menu > summary, .asw-savebar button):focus-visible {
  outline: 3px solid var(--outlo-control-focus);
  outline-offset: 3px;
}

/* Real operational table/list shells share a corner relationship. Never use
   overflow:hidden here: menus, keyboard outlines and sticky controls must escape. */
body.admin-shell-page.admin-modern .admin-data-table,
body.admin-shell-page.admin-modern.organizer-modern :is(.data-list, .team-list, .promotion-campaign-table) {
  border-radius: var(--outlo-surface-radius-workspace) !important;
}

/* Organizer rows switch to separate cards below 720px; the transparent mobile
   wrapper retains its original geometry, with no extra surrounding surface. */
@media (min-width: 721px) {
  body.admin-shell-page.admin-modern.organizer-modern .organizer-event-table {
    border-radius: var(--outlo-surface-radius-workspace);
  }
}

@media (min-width: 1051px) {
  body.admin-shell-page.admin-modern .admin-table thead th:first-child {
    border-top-left-radius: var(--outlo-surface-radius-workspace);
  }
  body.admin-shell-page.admin-modern .admin-table thead th:last-child {
    border-top-right-radius: var(--outlo-surface-radius-workspace);
  }
  body.admin-shell-page.admin-modern .admin-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--outlo-surface-radius-workspace);
  }
  body.admin-shell-page.admin-modern .admin-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--outlo-surface-radius-workspace);
  }
}

/* Desktop image tools stay miniature. On narrow/touch screens their actual hit
   area grows; no invisible overlays intercept nearby image or file controls. */
@media (max-width: 900px), (pointer: coarse) {
  #eventDialog.event-editor[data-editor-mode] :is(.pending-image-actions, .mini-actions) button {
    width: var(--outlo-control-height);
    min-width: var(--outlo-control-height);
    height: var(--outlo-control-height);
    min-height: var(--outlo-control-height);
    border-radius: var(--outlo-control-radius-compact);
  }
  #eventDialog.event-editor[data-editor-mode] .pending-image-actions .pending-primary-button {
    width: auto;
  }
  /* These groups also contain Hlavní, Nahoru, Dolů and Odstranit/Odebrat.
     Only arrows are square icons; text actions must be allowed to grow. */
  #eventDialog.event-editor[data-editor-mode] :is(.pending-image-actions, .mini-actions) button:not(.icon-only) {
    width: auto;
    height: auto;
    padding-inline: 10px;
  }
  #eventDialog.event-editor[data-editor-mode] input[type=file]::file-selector-button {
    min-height: var(--outlo-control-height);
  }
  body.admin-shell-page.admin-modern :is(.row-actions > button, .row-actions > a, .action-menu > summary, .pager-actions button, .asw-savebar button, .organizer-work-actions button, .team-actions button) {
    min-height: var(--outlo-control-height) !important;
    height: auto !important;
  }
  body.admin-shell-page.admin-modern .action-menu > summary {
    width: var(--outlo-control-height) !important;
    height: var(--outlo-control-height) !important;
  }
  body.admin-shell-page.admin-modern .action-menu-panel > :is(button, a) {
    min-height: var(--outlo-control-height);
  }
  .search-results-page .rs-event-menu > summary {
    width: var(--outlo-control-height);
    height: var(--outlo-control-height);
    min-height: var(--outlo-control-height);
    border-radius: var(--outlo-control-radius);
  }
  .map-page .detail-organizer-card #favoriteOrganizerButton {
    min-height: var(--outlo-control-height) !important;
  }
}

/* Bounded vertical panels keep the same content width before and after their
   scrollbar appears. This is deliberately opt-in: page roots, horizontal tab
   rails and outer editor/frame wrappers must not gain an empty scrollbar strip. */
.outlo-stable-scroll,
body #searchFilterHome .rs-filter-body,
body #searchFilterDialog,
body.map-page #mapFilterPanel.sheet-overview,
body.map-page #detailPanel,
body #eventDialog.event-editor #eventEditorFields,
body #eventDialog.event-editor #eventDetailPreview,
body #eventDialog .event-tag-chips.is-searchable,
body #eventDialog .artist-picker-new-results,
body #eventDialog .event-form-error,
body #eventDialog .editor-conflict-notice,
body #eventPeopleDialog .event-people-body,
body #userMenuScroll,
body #topbarSearchForm #globalSearchSuggestions,
body .mobile-menu-dialog .mobile-menu-body,
body .event-actions-dialog .event-actions-body,
body #notificationPanelItems,
body .notification-news-content,
body .outlo-consent__body,
body #mapFilterPopover,
body .rs-location-options,
body .origin-autocomplete,
body .rs-overflow,
body .rs-select-menu-options,
body.personal-center .pc-discovery-suggestions,
body .personal-profile-editor .ppe-dialog,
body .pi-editor .pi-dialog .pi-body,
body .pic-dialog .pic-content,
body.personal-center .pc-dialog,
body .fo-dialog,
body.auth-modern .auth-notice,
body .outlo-organizer-picker,
body .editor-backup-recovery,
body .promotion-composer .promotion-confirm-content,
body .credit-purchase-scroll,
body .credit-purchase-section-scroll,
body .promotion-guide-dialog:not(.is-native-map-preview) .promotion-guide-dialog-body,
body #feedbackDialog .feedback-fields,
body #feedbackDialog .feedback-success,
body #organizerEventReviewDialog .organizer-event-review-body,
body dialog.oi-confirm .oi-confirm-body,
body #orgView-profile details.public-profile-editor-preview,
body #organizerRequestDialog .request-fields,
body #organizerRequestDialog .request-error,
body #organizerRequestDialog #toast,
body #organizerRequestSuccessDialog,
body #eventCreateGuideDialog,
body #organizerWelcomeDialog.rules-dialog .rules-dialog-content,
body .outlo-stat-explanation,
body.admin-modern .admin-sidebar,
body.admin-modern #userMenuPanel,
body.admin-modern .admin-drawer,
body.admin-modern .admin-user-dialog,
body.admin-modern .admin-user-selected-list ul,
body.admin-modern .admin-user-actions-menu,
body.admin-modern #adminImageDialog,
body.admin-modern .pricing-dialog,
body.admin-modern .acp-dialog,
body.admin-modern .crq-list,
body.admin-modern .crq-detail-content,
body.admin-modern .nc-event-suggestions,
body.admin-modern .ass-tag-results,
body.admin-modern .admin-incoming-list-card .lr-admin-list,
body.admin-modern .admin-attach-results,
body.admin-modern .admin-incoming-body,
body.admin-modern .workspace-list,
body.admin-modern .workspace-timeline .lr-prewrap,
body.admin-modern .admin-reply-history .lr-prewrap,
body.admin-modern .workspace-settings-dialog,
body.admin-modern .audit-payload pre,
body.artist-admin-page .aa-list,
body.admin-modern .aa-list,
body.artist-admin-page .aa-event-results,
body.admin-modern .aa-event-results,
body.artist-admin-page #aaSeedDialog > #aaSeed,
body.admin-modern #aaSeedDialog > #aaSeed,
body.artist-admin-page .aa-seed-matches,
body.admin-modern .aa-seed-matches {
  scrollbar-gutter: stable;
}

/* Preserve the catalog's original 14px right-hand inset as a combined padding
   and native scrollbar budget. JS supplies the actual gutter, including zero
   for overlay scrollbars, instead of assuming one platform's scrollbar width. */
@media (min-width: 1051px) {
  body.search-results-page #searchFilterHome .rs-filter-body {
    padding-inline-end: max(0px, calc(14px - var(--outlo-filter-scrollbar-gutter, 0px)));
    /* Wider accessibility scrollbars can exceed the inset. Use only that
       excess from the adjacent layout gap, keeping the category row width. */
    margin-inline-end: min(0px, calc(14px - var(--outlo-filter-scrollbar-gutter, 0px)));
  }
}

@media (max-width: 1120px) {
  /* The collapsed map sheet only exposes its handle; it has no scroll gutter. */
  body.map-page #mapFilterPanel:not(.sheet-overview) { scrollbar-gutter: auto; }
}

@media (max-height: 520px) {
  /* Only the short-viewport request dialog scrolls as a whole. */
  body #organizerRequestDialog { scrollbar-gutter: stable; }
}

@media (max-height: 600px) {
  /* Here the rules content flows freely and the outer dialog owns scrolling. */
  body #organizerWelcomeDialog.rules-dialog { scrollbar-gutter: stable; }
}

/* Chromium uses the existing 6px custom notification scrollbar at rest and on
   hover. A native thin/auto switch would change the reserved width. */
@supports selector(::-webkit-scrollbar) {
  body #notificationPanel .notification-panel-items,
  body #notificationPanel .notification-panel-items:hover {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}
