/* Mini-adventure display styles (mad_*) */

.mad_wrap {
  background: var(--background);
  color: var(--text);
  padding: 1.25rem 1rem 1.5rem;
}

.mad_headerTitle {
  color: var(--primary);
}

.mad_headerSubtitle,
.mad_headerMeta,
.mad_supportNote,
.mad_status {
  color: var(--text);
  opacity: 0.8;
}

.mad_label {
  color: var(--text);
}

/* Search inputs */
.mad_input {
  background: var(--background);             /* was rgba(0,0,0,0.35) */
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

.mad_input:focus {
  background: var(--background);             /* was darker overlay */
  border-color: var(--primary);
  box-shadow: 0 0 0 .15rem rgba(255,255,255,0.1);
  color: var(--text);
}

/* Empty / error alert block inside #mad_list */
.mad_emptyAlert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: transparent;                   /* was rgba(0,0,0,0.35) */
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);   /* optional: subtle outline */
}

.mad_btn {
  border-radius: 999px;
  border-width: 1px;
  border-style: solid;
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 0.9rem;
  padding-inline: 1rem;
  padding-block: 0.4rem;
}

.mad_btn:hover,
.mad_btn:focus,
.mad_btn:active,
.mad_btn:active:focus {
  background: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

.mad_btn:disabled {
  opacity: 0.55;
}

.mad_card {
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.08);
}

.mad_cardBody {
  padding: 0.9rem 1rem;
}

.mad_cardTitle {
  color: var(--primary);
  font-size: 1.05rem;
}

.mad_cardSummary {
  color: var(--text);
  opacity: 0.8;
  margin-left: 15px;
  margin-right: 10px;
  font-size: 0.9rem;
  margin-top: 10px;
}

.mad_crBadgeWrap {
  font-size: 0.8rem;
  margin-top: 10px;
}

.mad_crBadge {
  background: var(--primary);
  color: var(--background);
}


/* Pagination */
.mad_pagination .page-link {
  border-radius: 999px !important;
  border-color: rgba(255,255,255,0.2);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
}

.mad_pagination .page-item.active .page-link {
  background: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

.mad_pagination .page-item.disabled .page-link {
  opacity: 0.4;
}

/* Modal */
.mad_modalDialog {
  max-width: 900px;
}

.mad_modalContent {
  background: var(--background);
  color: var(--text);
  border-radius: 0.75rem;
  border-color: rgba(255,255,255,0.1);
}

.mad_modalHeader {
  border-bottom-color: rgba(255,255,255,0.08);
}

.mad_modalTitle {
  color: var(--primary);
}

.mad_modalBody {
  font-size: 0.9rem;
}

.mad_modalSource {
  color: var(--text);
  opacity: 0.8;
}

.mad_modalDivider {
  border-top-color: rgba(255,255,255,0.08);
}

.mad_outcomesList dt {
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--primary);
}

.mad_outcomesList dd {
  margin-bottom: 0.25rem;
}

.mad_modalRewards,
.mad_modalNotes {
  min-height: 1.5rem;
}

.mad_modalImageInner {
  background: rgba(0,0,0,0.35);
  padding: 0.5rem;
  border-radius: 0.5rem;
}

/* Paragraph helpers inside modal */
.mad_para {
  color: var(--text);
}

.mad_paraEmpty {
  color: var(--text);
  opacity: 0.7;
}

.mad_wrap {
  background: var(--background);
  color: var(--text);
  padding: 1.25rem 1rem 1.5rem;
}

/* Cards: no muddy overlay, just theme background */
.mad_card {
  background: var(--background); /* was rgba(0,0,0,0.35) */
  border-top: 3px solid rgb(from var(--primary) r g b / .225);
  border-radius: 0px;
  margin-top: 20px;
}

.mad_modalContent {
  background: var(--background);
  color: var(--text);
  border-radius: 6px;            /* was larger */
  border-color: rgba(255,255,255,0.12);
}

.mad_modalImageInner {
  background: transparent;       /* was rgba(0,0,0,0.35) */
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
}

.mad_btn {
  border-radius: 6px; /* was 999px pill */
  border-width: 1px;
  border-style: solid;
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 0.9rem;
  padding-inline: 0.9rem;
  padding-block: 0.4rem;
  white-space: nowrap;
}

.mad_btn:hover,
.mad_btn:focus,
.mad_btn:active,
.mad_btn:active:focus {
  background: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

.mad_btn:disabled {
  opacity: 0.55;
}

/* Make all “View Details” buttons visually consistent */
.mad_btnView {
  cursor: pointer;
}

.mad_emptyAlert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: transparent;                   /* no dark panel */
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);   /* subtle outline only */
}

.mad_pagination .page-link {
  border-radius: 6px !important; /* was 999px */
  border-color: rgba(255,255,255,0.2);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
}

.mad_supporterPromo {
  color: var(--text);
  opacity: 0.9;
}

.mad_supporterLink {
  color: var(--primary);
  text-decoration: underline;
}

.mad_supporterLink:hover {
  text-decoration: none;
}

.mad_modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  z-index: 1000500; /* high enough to beat mobile menu, etc. */
}

.mad_modalOverlay.mad_isOpen {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mad_modalShell {
  max-width: 1100px;
  width: 100%;
  max-height: 95vh;   /* modal fits viewport height */
  padding: 1rem;
}

.mad_modalContent {
  background: var(--background);
  color: var(--text);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  max-height: 100%;
  display: flex;
  flex-direction: column; /* header + body + footer */
}

.mad_modalHeader,
.mad_modalFooter {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;  /* header/footer never disappear */
}

.mad_modalBody {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.9rem;
  overflow-y: auto;  /* body scrolls */
  flex: 1 1 auto;    /* fills remaining space */
}

.mad_modalOverlay.mad_isOpen {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 100px;
}

.mad_modalHeader {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mad_modalFooter {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.mad_modalTitle {
  color: var(--primary);
  margin: 0;
}

.mad_btn {
  border-radius: 6px;
  border-width: 1px;
  border-style: solid;
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 0.9rem;
  padding-inline: 0.9rem;
  padding-block: 0.4rem;
  white-space: nowrap;
}

.mad_btn:hover,
.mad_btn:focus,
.mad_btn:active,
.mad_btn:active:focus {
  background: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

.mad_btn:disabled {
  opacity: 0.55;
}

.mad_btnIcon {
  padding-inline: 0.5rem;
  padding-block: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ensure View buttons are consistent width */
.mad_cardActions .mad_btnView {
  min-width: 150px;
  text-align: center;
}

.mad_noScroll {
  overflow: hidden;
}

html.mad_noScroll,
body.mad_noScroll {
  overflow: hidden;
  height: 100%;
}

.mad_modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  z-index: 2147483000; /* bumped way up */
}


.mad_modalSummary {
  margin-top: 25px;
  margin-left: 25px;
  margin-right: 25px;
  border-bottom: 1px dotted var(--primary);
  padding-bottom: 25px;
  font-style: italic;
  color: var(--primary);
}


.mad_sectionHeading {
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 1px dotted rgb(from var(--primary) r g b / .325);
  margin-bottom: 10px;
  padding-bottom: 5px;
  margin-top: 30px;
}

.mad_modalDescriptionBody  {
  margin-left: 25px;
  margin-right: 35px;
  font-size: 0.85rem;
  line-height: 1.5rem;
}

.mad_para {
  margin-top: 20px;
  text-indent: 15px;
}

.mad_outcomesList {
    margin-left: 25px;
  margin-right: 25px;
}

.mad_outcomeBody {
  margin-left: 25px;
}

.mad_outcomeId {
  padding-bottom: 5px;
  font-weight: 300 !important;
}

.mad_outcomeBody strong {
  font-weight: 300;
  color: var(--primary);
}

.mad_outcomeBody > div + div {
  margin-top: 0.35rem;  /* tweak to taste */
}

/* Add space ABOVE each outcome except the first one */
.mad_outcomesList .mad_outcomeId {
  margin-top: 30px;   /* adjust to taste */
}

.mad_modalRewards {
    margin-left: 15px;
  margin-right: 15px;
  font-size: 0.9rem;
  margin-bottom: 50px;
}

.mad_modalNotes {
    margin-left: 15px;
  margin-right: 15px;
  font-size: 0.9rem;
    margin-bottom: 50px;
}

.mad_noTextIndent {
  text-indent: 0;
}



.mad_badgeCr {
  background: var(--primary) !important;
  color: var(--background) !important;
  height: 30px;
  width: auto;
  padding-left: 10px;
  padding-right: 10px;

  display: inline-flex;        
  align-items: center;         
  justify-content: center;     
}

.mad_modalCrText {
  vertical-align: baseline; 
  font-size: 1rem;
  font-weight: 300 !important;   
}

.mad_tagBadge {
  background-color: rgb(from var(--primary) r g b / .625);
  color: var(--background);
  font-weight: 300;
  font-size: 0.7rem;
  text-transform: capitalize;
  font-style: italic;
  height: 20px;
}

.mad_maincrBadge {
  background-color: rgb(from var(--primary) r g b / .925);
  color: var(--background);
  font-weight: 300;
  font-size: 0.7rem;
  text-transform: capitalize;
  font-style: italic;
  height: 20px;
  padding-right: 15px;
  margin-right: 10px;
  margin-left: 10px;
}
