/* One button look across the whole app (and the public booking pages).
   Loads last; "html body" outranks the copies of .btn that some views define in their
   own <style>. Only the look is set here (color, shape, type, height); width and
   margins stay with each screen. Palette: emerald #047857 primary, white secondary. */

/* Base: every button-like class shares shape, type, height and focus ring */
html body :is(.btn, .settings-save-button, .settings-cancel-button, .header-new-btn, .push-modal-btn, .onboarding-btn,
  .add-professional-btn, .invitation-action-btn, .btn-pedir-confirmacion, .avatar-upload-btn, .td-btn,
  .pc-nav-cta, .pc-bar-btn, .pc-confirm-btn, .today-btn, .impersonation-banner-button, .admin-link-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-primary, "Manrope", sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

html body :is(.btn, .settings-save-button, .settings-cancel-button, .header-new-btn, .push-modal-btn, .onboarding-btn,
  .add-professional-btn, .invitation-action-btn, .btn-pedir-confirmacion, .avatar-upload-btn, .td-btn,
  .pc-nav-cta, .pc-bar-btn, .pc-confirm-btn, .today-btn, .impersonation-banner-button, .admin-link-button):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .35);
}

html body :is(.btn, .settings-save-button, .settings-cancel-button, .header-new-btn, .push-modal-btn, .onboarding-btn,
  .add-professional-btn, .td-btn, .pc-bar-btn, .pc-confirm-btn):is(:disabled, .disabled, [aria-disabled="true"]) {
  opacity: .5;
  cursor: not-allowed;
}

/* Sizes */
html body .btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
html body .btn-lg, html body .pc-bar-btn, html body .pc-confirm-btn { min-height: 48px; padding: 0 24px; font-size: 15px; }
html body .btn-block { display: flex; width: 100%; }
/* The booking bar reads "Elegí un horario … Continuar →": label left, action right */
html body .pc-bar-btn { display: flex; width: 100%; justify-content: space-between; }

/* Primary: solid emerald */
html body :is(.btn-primary, .btn-success, .settings-save-button, .header-new-btn, .push-modal-btn, .onboarding-btn,
  .add-professional-btn, .btn-pedir-confirmacion, .td-btn-dark, .pc-nav-cta, .pc-bar-btn, .pc-confirm-btn) {
  background: #047857;
  background-image: none;
  border-color: #047857;
  color: #fff;
}
html body :is(.btn-primary, .btn-success, .settings-save-button, .header-new-btn, .push-modal-btn, .onboarding-btn,
  .add-professional-btn, .btn-pedir-confirmacion, .td-btn-dark, .pc-nav-cta, .pc-bar-btn, .pc-confirm-btn):is(:hover, :active):not(:disabled) {
  background: #065f46;
  border-color: #065f46;
  color: #fff;
  transform: none;
}
html body .pc-bar-btn:disabled { background: #cbd5e1; border-color: #cbd5e1; opacity: 1; }

/* Secondary: white with a soft border */
html body :is(.btn-secondary, .btn-outline, .settings-cancel-button, .td-btn-ghost, .today-btn, .invitation-action-btn,
  .avatar-upload-btn, .impersonation-banner-button, .admin-link-button) {
  background: #fff;
  background-image: none;
  border-color: #e2e8f0;
  color: #0f172a;
}
html body :is(.btn-secondary, .btn-outline, .settings-cancel-button, .td-btn-ghost, .today-btn, .invitation-action-btn,
  .avatar-upload-btn, .admin-link-button):hover:not(:disabled) {
  background: #f8fafc;
  border-color: #10b981;
  color: #0f172a;
  transform: none;
}

/* Ghost: green text, no box, for minor actions */
html body .btn-ghost { background: transparent; border-color: transparent; color: #047857; }
html body .btn-ghost:hover:not(:disabled) { background: #ecfdf5; color: #065f46; }

/* Danger: soft red; destructive but not shouting */
html body .btn-danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
html body .btn-danger:hover:not(:disabled) { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* Icon-only buttons: round, quiet */
html body .btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; min-height: 36px; padding: 0;
  border-radius: 999px; border: 1px solid transparent; background: transparent; color: #64748b;
}
html body .btn-icon:hover { background: #f1f5f9; color: #0f172a; }
html body .btn-icon-danger:hover { background: #fef2f2; color: #b91c1c; }

/* Small editor buttons (clinical record template) */
html body .clinical-tpl-btn {
  min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #e2e8f0;
  background: #fff; color: #0f172a; font: 600 13px var(--font-primary, "Manrope", sans-serif);
}
html body .clinical-tpl-btn:hover { border-color: #10b981; background: #f8fafc; }
html body .clinical-tpl-btn-danger { color: #b91c1c; border-color: #fecaca; }
html body .clinical-tpl-btn-danger:hover { background: #fef2f2; border-color: #fca5a5; }

/* Buttons hidden by class or attribute stay hidden (the rules above are more specific than .hidden) */
html body :is(.btn, .settings-save-button, .settings-cancel-button, .header-new-btn, .push-modal-btn, .onboarding-btn,
  .add-professional-btn, .invitation-action-btn, .btn-pedir-confirmacion, .avatar-upload-btn, .td-btn,
  .pc-nav-cta, .pc-bar-btn, .pc-confirm-btn, .today-btn, .btn-icon, .clinical-tpl-btn):is(.hidden, [hidden]) {
  display: none !important;
}
