/* Overrides for MVP panel: compact empty states, sane spacing, card actions */

/* Empty state: horizontal plaque, no dashed border, compact icon */
.empty {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  text-align: left;
  border: 0 !important;
  border-radius: var(--radius-card);
  padding: 18px 20px !important;
  justify-content: flex-start;
  background: var(--surface);
}
.empty .icon {
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--muted);
}
.empty strong {
  display: block;
}
.empty p {
  margin: 4px 0 0;
}
.empty .foot {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.empty .foot .btn,
.empty .foot .btn-sm {
  width: auto;
  min-height: 44px;
}

@media (max-width: 759px) {
  .empty {
    padding: 14px 16px !important;
    gap: 12px;
  }
  .empty .icon {
    width: 32px;
    height: 32px;
  }
  .empty .foot {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .empty .foot .btn,
  .empty .foot .btn-sm {
    flex: 1 1 auto;
    min-height: 38px;
  }
}

/* Spacing between blocks inside a state wrapper */
[data-screen-state] > * + * {
  margin-top: 28px;
}

/* Service-card actions: compact, never full-width inside card foot */
.service-card .foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.service-card .foot .btn,
.service-card .foot .btn-sm,
.service-card .foot .text-link {
  width: auto;
  flex: 0 0 auto;
}

@media (max-width: 759px) {
  .service-card .foot .btn,
  .service-card .foot .btn-sm {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.8rem;
  }
}

/* Page-actions: keep view-tabs compact, primary button auto-width on desktop */
.page-actions {
  align-items: center;
}
.page-actions > .btn,
.page-actions > a.btn {
  width: auto;
}

@media (max-width: 759px) {
  .page-actions > .btn,
  .page-actions > a.btn {
    width: 100%;
  }
}

/* State toolbar spacing in iframe demo */
#stateSwitch {
  margin-top: 18px;
}


/* Icon buttons are often used standalone (class="btn-icon-sm" without .btn).
   Ensure they are flex-centered, have no background/border and the icon has a stable size. */
.btn-icon-sm,
a.btn-icon-sm,
button.btn-icon-sm {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 0 !important;
  margin: 0;
  padding: 0;
  box-shadow: none !important;
}
.btn-icon-sm::before,
.btn-icon-sm::after {
  content: none !important;
}
.btn-icon-sm .icon {
  width: 20px;
  height: 20px;
}

/* When a page is shown inside the MVP panel iframe, hide its own shell chrome
   so the outer panel navigation and theme toggle stay the only ones. */
.framed .sidebar,
.framed .panel-header {
  display: none !important;
}
.framed .shell {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Info alert variant (used in file manager SFTP notice) */
.alert-info {
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
}
.alert-info .ico {
  stroke: var(--blue);
}
