/* Shared contours for action buttons and panels. Each section supplies its own colors. */
:root {
  --control-radius: 10px;
  --compact-control-radius: 8px;
  --control-edge: rgb(23 46 36 / 19%);
  --control-highlight: inset 0 1px 0 rgb(255 255 255 / 35%);
  --control-depth: 0 1px 2px rgb(23 46 36 / 14%);
  --panel-edge: rgb(32 57 46 / 12%);
  --panel-motion: .23s cubic-bezier(.22,.75,.25,1);
}

@media (prefers-reduced-motion:no-preference) {
  #app[data-session=active], #teamContent:not([hidden]) { animation: zabota-page-in var(--panel-motion) both; }
  dialog[open] { animation: zabota-panel-in var(--panel-motion) both; }
  dialog[open]::backdrop { animation: zabota-page-in .18s ease-out both; }
  @keyframes zabota-page-in { from { opacity:0; } }
  @keyframes zabota-panel-in { from { opacity:0; transform:translateY(8px); } }
}

@media screen {
  #app :is(
    .primary-button, .button-save, .button-soft, .button-danger, .guest-link,
    .icon-button, .period-button, .today-button, .mode-button,
    .sheet-close, .sidebar-close, .selection-discard, .draft-shortcut,
    .board-messages button, .range-buttons button, .corner button,
    .booking-service-add, .checkin-entry, .palette-row,
    .room-open, .room-edit, .remove-inventory, .matrix-move,
    .booking-invoice-open, .booking-doc-open a, .booking-table-action,
    .booking-finance-actions > a, .booking-card-menu > summary,
    .booking-dialog > header button
  ),
  .server-login-box button {
    border-radius: var(--control-radius);
    box-shadow: inset 0 0 0 1px var(--control-edge), var(--control-highlight), var(--control-depth);
  }

  #app :is(.icon-button, .sheet-close, .sidebar-close, .selection-discard,
    .booking-service-add, .matrix-move, .booking-dialog > header button,
    .range-buttons button, .corner button) {
    border-radius: var(--compact-control-radius);
  }

  #app :is(.primary-button, .button-save, .button-danger, .booking-service-add) {
    --control-edge: rgb(15 34 47 / 27%);
  }

  #app :is(.primary-button, .button-save, .button-soft, .button-danger, .guest-link,
    .icon-button, .period-button, .today-button, .mode-button, .sheet-close,
    .sidebar-close, .selection-discard, .booking-service-add):active:not(:disabled) {
    box-shadow: inset 0 0 0 1px var(--control-edge), inset 0 1px 2px rgb(23 46 36 / 16%);
  }

  #app .mode-button:not(.is-active) {
    box-shadow: inset 0 0 0 1px var(--panel-edge);
  }

  #app :is(.sidebar-item, .more-menu button, .item-list-button:not(.today-entry),
    .booking-card-menu-list .guest-link, .booking-card-menu-list .button-soft) {
    border-radius: var(--compact-control-radius);
    box-shadow: inset 0 0 0 1px var(--panel-edge);
  }

  #app :is(.sidebar-item.active, .item-list-button:not(.today-entry):hover) {
    box-shadow: inset 0 0 0 1px var(--control-edge), var(--control-depth);
  }

  #app #bookingInlineNotices .booking-table-action {
    box-shadow: none;
  }

  #app :is(
    .sheet, .booking-dialog, .server-login-box, .sidebar, .more-menu,
    .selection-actions, .zoom-control, .mode-switch, .card-booking-surface,
    .booking-money-tile, .sheet-summary, .summary-tile, .guest-profile-panel,
    .today-column, .staff-editor, .group-arrival-room, .rental-overview,
    .rental-item, .template-upload, .stock-table
  ),
  :is(#working, #login) :is(.task, .login, dialog, .summary > div, .task-column) {
    outline: 1px solid var(--panel-edge);
    outline-offset: -1px;
  }

  #working :is(.object-tile, .master-room, .shift-empty, .staff-nav) {
    border-radius: var(--compact-control-radius);
    box-shadow: inset 0 0 0 1px var(--control-edge), var(--control-highlight), var(--control-depth);
  }
}
