/* Banner image full screen */
.banner img {
  width: 100%; /* Full viewport height */
  object-fit: cover; /* Keep aspect ratio, crop if needed */
  display: block; /* Removes inline spacing */
  margin: 0;
  padding: 0;
}

/* more content section */
.downloads {
  margin: 100px auto 100px auto;
  padding: 0px;
}

.downloads__grid {
  width: 85%;
  margin: 0px auto 0px auto;
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.downloads__card {
  background-color: #a10d12;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.downloads__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.downloads__card a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.downloads__card-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.downloads__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: invert(1);
}

.downloads__title {
  font-size: 1.2rem;
  font-weight: bold;
}

.downloads__image img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  margin-top: 20px;
}

.downloads__description {
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

/* canvas */
.canvas {
  display: grid;
  width: 90%;
  grid-template-columns: 1fr 1fr;
  margin: 40px auto 40px auto;
  gap: 20px;
}

/* image selector popup*/
.image_selector {
  overflow: hidden;
  display: grid;
  grid-template-columns: 30% 70%;
  margin: 0 auto 0 auto;
  width: 100%;
  height: 500px;
  border: 4px solid black;
}

.left_selector_panel {
  border-right: 2px solid black;
  text-align: center;
  overflow-y: scroll;
}

.left_selector_panel p {
  font-size: 12px;
  border: 2px solid #df1f26;
  width: 60%;
  margin: 20px auto 20px auto;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.1s ease-out;
}

.left_selector_panel p:hover {
  border: 2px solid #df1f26;
  background-color: #df1f26;
  color: white;
}

.right_selector_panel {
  overflow-y: scroll;
}

.image_selector img {
  width: 100%;
  transition: 0.4s ease;
  transform-origin: center center;
}

.image_selector img:hover {
  transform: scale(1.1);
}

.image_panel {
  display: none;
  gap: 20px;
  grid-template-columns: 1fr 1fr 1fr;
  width: 90%;
  margin: 0 auto 0 auto;
  text-align: center;
  padding: 10px;
}

.image_panel p {
  font-weight: bold;
  padding: 0;
  margin: 0 0 20px 0;
}

.image_panel[data-category="sign_template"] {
  display: grid;
}

/* sign editor */
#sign {
  background-color: white;
  border: 4px solid black;
  text-align: center;
  align-items: center;
  aspect-ratio: 420 / 297;
  width: 700px;
  overflow: hidden;
  margin: 0 auto 0 auto;
  display: block;
}

.signText {
  font-size: 40px;
}

.signTextSubtitle {
  font-size: 30px;
}

.editorWrapper {
  width: 100%;
  height: 22.8%; /* crop to 25.8% height */
  overflow: hidden; /* hide the rest of the image */
}

#editorPictogram {
  width: 100%;
  height: auto; /* maintain aspect ratio */
  display: block;
  object-position: top; /* align image at top */
}

/* OSHA & ANSI styles */
.osha_editor {
  display: none;
}

/* ANSI styles */
.ansi_editor {
  width: 100%;
  height: 100%;
  align-items: center;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
}

.ansi_editor img {
  width: 90%;
  margin-top: 20px;
}

.symbol_side {
  border-right: 2px solid black;
  border-top: 5px solid black;
  overflow: hidden;
}

.text_side {
  border-left: 2px solid black;
  border-top: 5px solid black;
  overflow: hidden;
}

.text_side p {
  overflow-wrap: break-word;
}

/* OSHA editor styles */
.osha_editor {
  /* use flexbox */
  flex-direction: column; /* stack children vertically */
  align-items: center; /* center horizontally inside */
}

.osha_editor p {
  display: block; /* make sure it's a block element */
  margin: 5px 0; /* add spacing between them */
}

/* input & editing */
.canvas_tools {
  margin: 40px auto 0px auto;
  text-align: center;
  width: 90%;
}

.editor_control {
  display: grid;
  grid-template-columns: 40% 40% 20%;
  align-items: stretch;
  padding-top: 10px;
}

.control_column {
  text-align: center;
  margin-bottom: 40px;
}

.control_column p,
.font-size-control p {
  margin: 0;
  padding: 0;
}

.font-size-control p {
  margin-bottom: 5px;
  font-weight: bold;
}

.font-size-control span {
  font-weight: normal;
  margin-left: 4px;
}

.font-size-control .icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.input {
  border: 2px solid black;
  border-radius: 10px;
  width: 80%;
  height: 32px;
  padding: 5px;
}

/* slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: black;
  border-radius: 3px;
  outline: none;
  cursor: grab;
  width: 90%;
  display: block;
  margin: 10px auto;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: black;
  cursor: grab;
}

/* redesigned tool buttons */
.tool_button {
  display: flex;
  gap: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  color: black;
  padding: 10px 20px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  margin-bottom: 20px;
  background: none;
  border: none;
  justify-content: center;
}

/* Hover float + color change */
.tool_button:hover {
  transform: translateY(-3px);
  color: #df1f26;
}

/* Animated underline */
.tool_button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #df1f26;
  transition: width 0.3s ease;
}

.tool_button:hover::after {
  width: 100%;
}

.tool_icon {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

/* download overlay */
.download_overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.download_popup {
  background: white;
  border: 2px solid black;
  border-radius: 10px;
  padding: 30px;
  width: 500px;
  text-align: center;
  position: relative;
}

.download_popup .close_btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 20px;
  cursor: pointer;
  background: black;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
}

.download_buttons button {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.download_buttons button:hover {
  background: #0056b3;
}

/* affiliate */
.affiliate_parent {
  background: linear-gradient(135deg, #ffd580 0%, #ffa500 100%);
  color: #20384c;
  text-align: center;
  padding: 20px;
}

.affiliate_parent p {
  font-weight: bold;
  font-size: 1.5rem;
}

.affiliate_grid {
  display: grid;
  width: 80%;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: stretch;
  margin: 0px auto 0px auto;
}

.affiliate_grid p {
  font-weight: bold;
}

.affiliate_grid img {
  width: 80%;
  border-radius: 50%;
}

@media (max-width: 900px) {
  /* more content section */
  .downloads {
    margin: 20px auto 20px auto;
    padding: 0px;
  }

  .downloads__grid {
    width: 90%;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 5px;
  }
  .downloads__icon {
    width: 20px;
    height: 20px;
  }

  .downloads__title {
    font-size: 0.8rem;
    font-weight: bold;
  }

  .downloads__image img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 20px;
  }

  .downloads__description {
    font-size: 0.5rem;
    line-height: 1.5;
    text-align: center;
  }

  .canvas {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  /* image selector popup*/
  .image_selector {
    width: 95%;
  }

  .left_selector_panel p {
    width: 70%;
    font-size: 10px;
  }

  .image_selector img {
    width: 90%;
    transition: 0.4s ease;
    transform-origin: center center;
  }

  .image_selector img:hover {
    transform: scale(1.1);
  }

  .image_panel p {
    font-size: 10px;
  }

  /* input & editing */
  .canvas_tools {
    margin: 40px auto 0px auto;
    text-align: center;
    width: 90%;
  }

  .editor_control {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-top: 10px;
  }

  .font-size-control .icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
  }

  .input {
    border: 2px solid black;
    border-radius: 10px;
    width: 80%;
    height: 32px;
    padding: 5px;
  }

  #sign {
    width: 370px;
  }

  .signText {
    font-size: 10px;
  }

  .signTextSubtitle {
    font-size: 10px;
  }

  /* affiliate */
  .affiliate_parent {
    background: linear-gradient(135deg, #ffd580 0%, #ffa500 100%);
    color: #20384c;
    text-align: center;
    padding: 20px;
  }

  .affiliate_parent p {
    font-weight: bold;
    font-size: 1.5rem;
  }

  .affiliate_grid {
    display: grid;
    width: 80%;
    grid-template-columns: 1fr;
    align-items: stretch;
    margin: 0px auto 0px auto;
  }

  .affiliate_grid p {
    font-weight: bold;
  }

  .affiliate_grid img {
    width: 80%;
    border-radius: 50%;
  }
}
