/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */
/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html, body {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  background-color: #cccccc; /* dark gray */
  scroll-behavior: smooth;
  overscroll-behavior: auto;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 2px solid #bbbbbb;
  margin: 1em 0;
  padding: 0;
}


/* ==========================================================================
   Custom Layout for Plectra Test Page
   ========================================================================== */

.banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 11vh;
  z-index: 1000;
  background-image:
          linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 1) 100%),
          url('../img/polsterworks-banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.banner-title { /* Positioning and styling for the H1 title */
  position: absolute;
  top: 15px; /* Your desired offset from the bottom */
  right: 95px; /* Your desired offset from the right */

  display: inline-block;
  background-color: black; /* Solid black for the text background */
  color: white;
  padding: 0.3em 0.5em;
  font-size: 1.3rem; /* Default font size for larger screens */
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
}

body.dev .footer-prod {
  display: none;
}

body.prod .footer-dev {
  display: none;
}

.body-wrapper {
  display: flex;
  justify-content: center;
}

/* Custom styles for Bootstrap's btn-primary */
.btn-primary {
  background-color: #064775; /* Your desired base color */
  border-color: #064775;     /* Match base color */
}

.btn-primary:hover {
  background-color: #0c2739; /* A slightly darker shade of your color on hover */
  border-color: #0c2739;     /* Match darker shade for border */
}

.btn-primary:focus,
.btn-primary.focus {
  box-shadow: 0 0 0 0.25rem rgba(6, 71, 117, 0.5); /* Use your primary color's rgba for the glow */
}

.btn-primary:active,
.btn-primary.active {
  background-color: #064775; /* Revert to base color on active if you like, or slightly darker */
  border-color: #064775;
}

.content-area {
  background-color: #e8f5e9; /* light green */
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;  /* Allows text/content to wrap properly */
  max-width: 640px;  /* Set a max width */
  margin: 0 auto;
  padding: 0;
}

.custom-modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.custom-modal-content {
  position: relative;
  margin: 5% auto;
  padding: 20px;
  background-color: #fff;
  max-width: 90%;
  text-align: center;
}

.earth-frame {
  display: block;              /* instead of inline-block */
  width: fit-content;          /* shrink-wrap to image width */
  margin: 0 auto;              /* ✅ centers it horizontally */
  padding: 4px;
  background-color: #cccccc;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.earth-frame img {
  max-height: 157px;     /* Reduce this as needed */
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

.fixed-layout {
  width: 1075px; /* or whatever fixed width you want */
  display: flex;
}

.full-image {
  display:  block;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.general-button-container {
  margin-top: 0.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#imageModal .modal-content {
  padding: 5px;
  background-color: #2c2c2c; /* dark gray only for image modal */
  border: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

#imageModal .modal-body {
  padding: 5px;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #2c2c2c;
}

#imageModal .modal-body img.full-image {
  max-height: 75vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

#imageModal .modal {
  display: block;
  align-items: flex-start;
}

#imageModal .modal-dialog {
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.img-thumbnail {
  cursor: pointer;
}

.info-button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two columns */
  gap: 0.75rem;
  max-width: 600px;
  margin-top: 1rem;
}

.info-button {
  width: 100%;
}

.interactive-diagram {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.interactive-diagram h3 {
  margin-bottom: 0.5rem; /* or even 0 if you want it flush */
  margin-top: 0;
}

.limited-width-text {
  max-width: 600px;
  padding-left: 10px;
}

.main-body {
  margin: 0 auto;          /* Horizontally center the div */
  margin-top: 10.5vh; /* matches .banner height */
  height: 807px;
  background-color: transparent;
  display: flex;
  padding: 0.6rem;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.modal-body img.full-image {
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: #ccc;
}

.modal-dialog {
  margin: 10px auto;
}

.modal-dialog.wide-image-modal {
  margin: 1rem auto;
  max-width: fit-content;  /* shrink-wrap around content */
  width: auto;
}

.modal-header {
  background-color: #064775;
  color: white;
}

.modal-header .btn-close {
  filter: invert(1) brightness(2);
}

.modal-image-title {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.modal-title {
  width: 100%;
  text-align: center;
}

.navigation-sidebar {
  width: 220px;
  flex-shrink: 0;
  background-color: #d0ebff; /* light blue */
  margin-right: 3px;
  border-right: 1px solid #ddd;
  padding: 0;
}

.navigation-sidebar .list-group {
  margin-top: 9px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.navigation-sidebar .list-group-item {
  display: flex;
  align-items: center; /* ✅ Vertically center content */
  justify-content: center; /* Optional: horizontally center if needed */
  padding-top: 0.8rem;
  padding-bottom: 0.5rem;
}

.right-column {
  background-color: #d0ebff; /* light blue */
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0.33rem;
}

.row {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;  /* Prevent wrapping to keep layout clean */
}

.site-logo { /* Styling for the inlined SVG logo */
  width: 80px;
  height: auto;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  fill: white;
  stroke: white;
  color: white; /* For currentColor SVGs */
}

.svg-container {
  background-color: #eee;
  width: 100%;
  height: auto;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;  /* ✅ Ensure centering */
  border: 1px dashed #ccc;
  padding: 0;
  margin: 0;
}

.svg-container object {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
}

.svg-wrapper {
  width: 600px;         /* Match intended fixed size */
  margin: 0 auto;       /* Center horizontally */
  padding-left: 9px;
}

.thumbnail-column {
  text-align: center;
  padding-top: 0.7rem;
}

.thumbnail-frame {
  display: inline-block;           /* Shrink-wrap around image */
  padding: 5px;
  background-color: #cccccc;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-top: 0.3rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thumbnail-frame img.img-thumbnail {
  max-height: 127px;
  max-width: 100%;  /* Prevent image from overflowing frame */
  height: auto;
  width: auto;
  display: inline-block;
  margin: 0; /* Remove excess margin */
  padding: 0; /* Just in case */
}

.vertical-spacer {
  height: 217px; /* Adjust as needed */
}

/* ==========================================================================
   Responsive adjustments for smaller screens (e.g., mobile)
   THIS SHOULD BE THE ONLY @media (max-width: 768px) BLOCK
   ========================================================================== */
@media (max-width: 768px) {
  .banner {
    height: 85px; /* Responsive height for banner */
  }

  .banner-title { /* Responsive adjustments for the title */
    bottom: 5px;
    right: 5px;
    font-size: .85rem; /* Responsive font size */
    padding: 0.2em 0.4em;
  }

  .site-logo { /* Responsive adjustments for the logo */
    width: 50px;
    top: 5px;
    right: 5px;
  }

  .awips-diagram-svg {
    min-width: unset; /* Remove minimum width on mobile, let it scale */
    min-height: unset; /* Remove minimum height on mobile, let it scale */
    width: 95%; /* Take up most of the available width on mobile */
    height: auto;
  }
  .svg-container { /* You might also reduce the min-height of the container on mobile */
    min-height: 300px;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 * causes content to wrap 1 word per line:
 * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.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;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}


/* ==========================================================================
   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 */
}

#imageModal .modal-header {
  padding: 0.40rem 0.5rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

#imageModal .modal-title {
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

#imageModal .btn-close {
  padding: 0.35rem;
  margin-left: 0.5rem;
}
