/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

html {
  background-image: url('https://img.magnific.com/free-vector/flat-design-silver-stars-pattern-design_23-2149949706.jpg');
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  font-size: 1em;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
}

.pseudo-h4 {
  display: block;
  font-size: 1em;
  font-weight: bold;
  margin-top: 1.33em;
  margin-bottom: 1.33em;
  margin-left: 0;
  margin-right: 0;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}


textarea {
  resize: vertical;
}


.hidden,
[hidden] {
  display: none !important;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  gap: 15px; /* Adjust this number to make the spacing smaller or larger */
}

.download-box {
  background-color: rgba(25, 25, 119, 0.62);
  color: #E6E2D1;
  height: auto;
  width: 40%;
  min-width: 570px;
  min-height: 200px;
  max-width: 700px;
  justify-self: center;
  align-self: center;
  justify-content: center;
  align-content: center;
  border-radius: 30px;
  text-align: center;
  font-size: 1.5rem;
  padding: 30px 20px;
}

@media (max-width: 1028px) {
  
  div .download-box {
    min-width: 78% !important;
    width: 5% !important; /* Force-overrides desktop sizing */
    min-height: 40% !important;
    color: #E6E2D1 !important;
    border-radius: 30px !important;
    font-size: 0.95rem;
  }
  
  div .download-button {
    background-color: #5d3ec1;
    color: #ffffff;
    font-size: 1.3rem;
    padding: 11px 30px 11px 30px; /* Top, Right, Bottom, Left */
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 14px 0 #5009ad, 0 8px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  div .scrollable-text {
    display: flex;
    flex-direction: column;
    padding: 12px !important;
    max-height: 80vh;
    min-width: 100% !important;
  }
  
  ol {
    padding-left: 15px !important;
    padding-bottom: 15px !important;
  }
  
  li {
    padding-bottom: 5px !important;
  }
  
  div .tabbed-modal-wrapper {
   overflow: hidden !important; 
  }
  
  div .tab-header{
    flex-wrap: wrap !important;
  }
  
  .tab-btn {
    flex: 1;
    background: none;
    border: none;
    border-right: 1px solid #ccc;
    border-top: 1px solid #ccc !important;
    padding: 7px 10px !important;;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    color: #333;
    position: relative;
    transition: background 0.2s;
    max-width 20px !important;
  }
  
  .modal-content-wrapper {
    display: flex;
    flex-direction: column;
    padding: 5px !important;
    max-height: 80vh;
    overflow: hidden !important;
  }
  
  .tab-content-container {
    padding: 12px !important;
    max-height: 50vh;
    overflow-y: auto;
    background-color: #ffffff;
  }
}


h2 .download-box {
  text-align: center;
}

a .download-box {
}

.download-button {
  background-color: #5d3ec1;
  color: #ffffff;
  font-size: 1.3rem;
  padding: 11px 30px 11px 30px; /* Top, Right, Bottom, Left */
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 14px 0 #5009ad, 0 8px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.help-button {
  /* height: 5vh;
  width: 20vh;*/
  border-radius: 11px;
  background-color: #c19bff;
  color: #fefdff;
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 350;
  padding: 8px 24px 9px 24px; /* Top, Right, Bottom, Left */
}


.download-button:active {
  transform: translateY(2px);
  box-shadow: 0 6px 0 #5009ad, 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* Style the native dialog backdrop and container */
dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 600px;
  width: 90%;
  max-height: 80vh; /* Keeps it inside the viewport */
  background-color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);

  opacity: 0;
  transform: scale(0.95); /* Slight shrink effect for polish */
  transition: opacity 0.3s ease, transform 0.3s ease,
  display 0.3s ease allow-discrete,
  overlay 0.3s ease allow-discrete;
}

dialog:open {
  opacity: 1;
  transform: scale(1);
}

@starting-style {
  dialog:open {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Dim background behind the dialog */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, display 0.3s ease allow-discrete, overlay 0.3s ease allow-discrete;

}

dialog:open::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

@starting-style {
  dialog:open::backdrop {
    background-color: rgba(0, 0, 0, 0);
  }
}

/* Inner wrapper for layout */
.modal-content-wrapper {
  display: flex;
  flex-direction: column;
  padding: 24px;
  max-height: 80vh;
}

/* Makes only the text container scrollable */
.scrollable-text {
  overflow-y: auto;
  max-height: 40vh;
  padding-right: 8px;
  white-space: pre-wrap;
  font-family: sans-serif;
  font-size: 0.875rem;
  color: #333333;
}

.scrollable-text p {
  margin: 20px 0; /* Reduces top/bottom gap on paragraphs */
}

.scrollable-text ul {
  margin: 4px 0;
  padding-left: 20px;
}

/* Style the details dropdowns so they don't drift apart */
.scrollable-text details {
  margin: 30px 30px 6px 0;
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

/* Tighten the clickable summary header */
.scrollable-text summary {
  cursor: pointer;
  font-weight: bold;
  margin: 0;
  padding: 2px 0;
}

/* Remove default spacing on paragraphs/lists inside details */
.scrollable-text details p,
.scrollable-text details ul {
  margin: 20px 0 5px 20px;
  padding: 0;
}

/* Close button styling */
#close-modal {
  background-color: #e5e5e5;
  align-self: flex-end;
  padding: 8px 16px;
  background-color: #666161;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  height: 30px
  width: 5%
}

#close-help-modal {
  background-color: #e5e5e5;
  padding: 8px 16px;
  background-color: #666161;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  align-self: center;
}

#close-tabbed-modal {
  background-color: #e5e5e5;
  align-self: flex-end;
  padding: 8px 16px;
  background-color: #666161;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#close-modal:hover {
  background-color: #4d4949;
}

.coffee-widget {

}

.button-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 15px; /* Controls the space between the side-by-side buttons */
}

/* Tabbed Modal Styling */
.tabbed-modal-wrapper {
  padding: 0 !important; /* Overrides default padding to let tabs stretch */
  width: 100% !important;
  max-width: 700px !important;
  
}

.tab-header {
  display: flex;
  background-color: #f1f1f1;
  border-bottom: 2px solid #ccc;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-right: 1px solid #ccc;
  padding: 14px 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  color: #333;
  position: relative;
  transition: background 0.2s;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn:hover {
  background-color: #e2e2e2;
}

/* Active tab grey bottom underline indicator */
.tab-btn.active {
  background-color: #ffffff;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px; /* Overlaps the header border */
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #8c8c83; /* Matches your grey color scheme */
}

.tab-content-container {
  padding: 24px;
  max-height: 50vh;
  overflow-y: auto;
  background-color: #ffffff;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-pane h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #111;
}

.manual-indent {
  padding-left: 30px;
}

.download-button:focus-visible {
  outline: none;
  background-color: #3b238c !important; /* Changes to a noticeably lighter/darker purple */
  border: 4px solid #ffffff !important;  /* Forces a hard visible frame inside the button */
}