/**
 * Olayemi Hospital — consistent borderless card surfaces.
 *
 * Public pages, patient dashboards, clinician and administrative portals
 * all use a shared treatment: cards are separated by their background,
 * spacing and subtle elevation rather than a visible rectangular outline.
 *
 * Accessibility and function:
 *  - Input, select, textarea, checkbox, tables, alerts, and buttons retain
 *    their own meaningful boundaries and states.
 *  - Keyboard-focused interactive cards keep a high-contrast focus ring.
 *  - Invoice table rules, the print page, and the browser's print margins
 *    are not changed by this stylesheet.
 *
 * This stylesheet is deliberately loaded LAST, after page-specific styles.
 */

/*
 * Match a class token whose exact suffix is "-card" even when additional
 * classes follow it. This covers the many service, statistic, resource,
 * patient, billing, and administrative card variants without requiring
 * every new component to be added to a long selector list.
 *
 * Don't match "-card-body", "-card-header", etc.; their internal separators
 * must remain independently styled.
 */
:is(
  .card,
  [class$="-card"],
  [class*="-card "],
  .admin-panel,
  .about-panel,
  .departments-panel,
  .booking-panel,
  .icon-box,
  .feature-box,
  .service-box,
  .count-box,
  .video-box,
  .svc-info-box,
  .invoice-summary-box,
  .pp-section,
  .policy-changelog,
  .modal-content
) {
  border: 0 !important;
  border-color: transparent !important;
  border-width: 0 !important;
  outline: 0;
}

/*
 * Keep meaningful shadow depth, but prevent outlines constructed from
 * inset or 0-spread shadows on broad card surfaces. Preserve the
 * component's existing shadow otherwise so groups remain distinguishable.
 */

/* Hospital privacy page has a few section surfaces built without "-card". */
.pp-section,
.pp-right-card,
.pp-retention-card,
.pp-badge-card,
.pp-contact-card {
  border: 0 !important;
  border-width: 0 !important;
  outline: 0;
}

/*
 * Interactive card surfaces must still have a clearly visible focus
 * indicator during keyboard operation. This takes precedence over the
 * decorative-outline reset above.
 */
:is(
  a.card,
  button.card,
  a[class$="-card"],
  button[class$="-card"],
  a[class*="-card "],
  button[class*="-card "],
  [role="button"][class$="-card"],
  [role="button"][class*="-card "],
  [tabindex][class$="-card"],
  [tabindex][class*="-card "]
):focus-visible {
  outline: 3px solid #60a5fa !important;
  outline-offset: 3px;
}

/* Restore crisp focus contrast for dark portal surfaces. */
[data-theme="dark"] :is(
  a.card,
  button.card,
  a[class$="-card"],
  button[class$="-card"],
  a[class*="-card "],
  button[class*="-card "],
  [role="button"][class$="-card"],
  [role="button"][class*="-card "]
):focus-visible {
  outline-color: #93c5fd !important;
}

/* Maintain adequate visual grouping when several cards adjoin. */
.page-portal :is(
  .patient-card,
  .visit-detail-card,
  .admin-panel,
  .admin-table-card,
  .admin-list-table-card,
  .admin-stat-card
) {
  background-clip: padding-box;
}

/* Dashboard attention notices are card surfaces too, not form controls. */
.page-patient-dashboard .dash-alert,
.page-patient-dashboard .dash-alert-danger,
.page-patient-dashboard .dash-alert-warning,
.page-patient-dashboard .dash-alert-info {
  border: none !important;
  border-width: 0 !important;
  outline: none !important;
}

/* Do not remove keyboard focus from action links in the attention cards. */
.page-patient-dashboard .dash-alert-btn:focus-visible {
  outline: 3px solid #93c5fd !important;
  outline-offset: 3px;
}

/* Shared notification entries are buttons with one native click target. */
.notification-dropdown .notif-item {
  appearance: none;
  display: flex;
  align-items: flex-start;
  width: 100%;
  border: none;
  border-radius: 0;
  background-color: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.notification-dropdown .notif-item.notif-unread {
  background-color: rgba(99, 102, 241, .06);
}

.notification-dropdown .notif-item:hover {
  background-color: rgba(99, 102, 241, .12);
}

.notification-dropdown .notif-item:focus-visible {
  outline: 3px solid #60a5fa !important;
  outline-offset: -3px;
}

.notification-dropdown .notif-item:disabled {
  cursor: progress;
}

.notification-dropdown .notif-body,
.notification-dropdown .notif-title,
.notification-dropdown .notif-text,
.notification-dropdown .notif-time {
  display: block;
}
