/* Bootstrap Overrides - Reset aggressive reboot styles */
/* This file should be loaded after Bootstrap but before theme styles */

/* Reset link styles to default behavior */
a {
  color: #263DC9;
  text-decoration: underline;
}
a:hover {
    color: #263DC9;
}
a:focus {
  outline-offset: 2px;
}

/* Reset button styles */
button {
  background-color: transparent;
  border: none;
}
button:focus {
  outline-offset: 2px;
}

/* Reset heading margins and set RAIC sizes */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

h1 {
  font-size: 56px;
}

h2 {
  font-size: 40px;
}

h3 {
  font-size: 36px;
}

h4 {
  font-size: 30px;
}

h5 {
  font-size: 24px;
}

h6 {
  font-size: 20px;
}

/* Reset paragraph margins */
p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Reset list styles */
ul, ol {
  padding-left: 1rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Reset dl, dd, dt */
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

dd {
  margin-bottom: 0.5rem;
  margin-left: 0;
}

/* Reset form elements */
input,
button,
select,
optgroup,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Keep img behavior */
img {
  vertical-align: middle;
}

/* Reset table styles */
table {
  caption-side: bottom;
  border-collapse: collapse;
}

/* Reset blockquote */
blockquote {
  margin: 0 0 1rem;
}

/* Reset focus styles for better accessibility */
:focus {
  outline: 1px dotted currentColor;
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Reset button focus */
button:focus:not(:focus-visible) {
  outline: none;
}

/* Specific overrides for RAIC theme */
body {
  font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

/* Additional resets for Bootstrap components */
.btn:focus {
  box-shadow: none !important;
}


/* Reset Bootstrap card styles */
.card {
  border: 1px solid rgba(0,0,0,.125);
}

/* Preserve RAIC theme typography */
.raic-staff-card,
.raic-staff-card:hover,
.raic-staff-card:focus {
  text-decoration: none !important;
  color: inherit !important;
}

/* Fix CiviCRM jQuery UI Dialog pointer-events issue */
/* CiviCRM uses jQuery UI dialogs which need pointer-events enabled for interactions */
.ui-dialog,
.ui-dialog-content,
.ui-widget-overlay + .ui-dialog {
  pointer-events: auto !important;
}

/* Also fix any CiviCRM-specific modal dialogs */
#crm-container .modal-dialog,
.crm-container .modal-dialog,
div[class*="crm-"] .modal-dialog {
  pointer-events: auto !important;
}