/* =========================
   LAYOUT (Main Container)
   ========================= */
.tab-content {
  display: none;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 2%;
  padding: 2%;
  padding-top: 4%;
  border-radius: 8px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  background: #fafafa;
}

/* General container for input/output sections */
.colinp {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* better spacing */
  align-items: center;
  padding: 2%;
  background: #ffffff;
  /* light blue */
  border: 2px groove #ddd;
  border-radius: 8px;
  max-width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.colout {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2%;
  margin: 1%;
  background: #f6f3f3;
  border: 2px groove #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

h2 {
  font-size: 1.5rem;
  /* balanced size */
  font-weight: 600;
  /* semi-bold */
  color: #2c3e50;
  /* dark blue-gray */
  text-align: center;
  /* center aligned */
  margin-bottom: 15px;
  /* space below heading */
  border-bottom: 2px solid #8d8989;
  /* subtle underline */
  padding-bottom: 5px;
  /* spacing for underline */
  letter-spacing: 0.5px;
  /* slightly spaced text */
}

/* =========================
   LEFT PANEL (Band Inputs)
   ========================= */
.bands {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding-top: 10%;
  padding-bottom: 10%;
}

.row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.cbe {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: sans-serif;
  font-size: large;
  color: #415710;
  white-space: nowrap;
}

/* Input fields */
.colinp input,
.colinp select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

/* =========================
   RIGHT PANEL (SVG + Output)
   ========================= */
.svgbox {
  padding: 3%;
  display: flex;
  justify-content: center;
}

svg {
  max-width: 480px;
  width: 100%;
  filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.2))
}

.outbox {
  margin-top: 16px;
  padding: 12px;
  border: 2px groove #ddd;
  border-radius: 10px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.val,
.range {
  display: block;
  margin: 10px auto;
  padding: 8px;
  min-width: 200px;
  height: 35px !important;
  border-radius: 6px;
  border: 2px solid #CCC;
  background: #fff;
  text-align: center;
  font-weight: bold;
}

/* =========================
   Utilities
   ========================= */

/* =========================
   TAB BUTTONS
   ========================= */
/* Tab buttons */
.tab-buttons {
  display: flex;
  border-bottom: 2px solid #ccc;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  color: #000;
  background: #f2f2f2;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.tab-btn.active {
  background: #e4eab2;
  color: #000;
  border-bottom: 2px solid #28a745;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.tab-content.active {
  display: flex;
  /* <- make the active tab a flex container */
  flex-wrap: wrap;
  align-items: stretch;
}

/* =========================
   Loading Effect
   ========================= */
.loading-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.7);
  /* 90% opaque white */
  padding: 20px;
  border-radius: 80px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  text-align: center;
  display: none;
  /* hidden initially */
  z-index: 2000;
}

.sandclock {
  width: 100px;
  /* adjust size of your GIF */
  height: 100px;
}

/* =========================
   Custom Alert messages
   ========================= */
/* Overlay */
.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

/* Box */
.custom-alert-box {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  min-width: 280px;
}

/* Icon */
#customAlertIcon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}

/* Message */
#customAlertMsg {
  font-size: 16px;
  margin-bottom: 20px;
  display: block;
}

/* Button */
#customAlertBtn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: #28a745;
  color: #fff;
  cursor: pointer;
}

#customAlertBtn:hover {
  filter: brightness(1.1);
}

/* =========================
   BUTTONS
   ========================= */
.rowbut button {
  /* Special Parameters */
  cursor: pointer;
  transition: box-shadow 0.2s;

  /* Margin,Padding,Gaps */
  padding: 8px 12px;

  /*Color,Border,Shadows */
  color: #000;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.submit {
  /*Color,Border,Shadows */
  background-color: #c1d82a;
}

.submit:hover,
.submit:active {
  /*Color,Border,Shadows */
  color: #fffdfd;
  background-color: #889d13;
}

.reset {
  /*Color,Border,Shadows */
  background-color: #fbb7b0;
}

.reset:hover,
.reset:active {
  /*Color,Border,Shadows */
  color: #fffdfd;
  background-color: #f3475e;
}

button:hover {
  /*Color,Border,Shadows */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .colinp,
  .colout {
    flex: 1 1;
    padding: 10%;
  }

  .rowinp {
    /*Alignments*/
    /* stack cards vertically */
    flex-direction: column;
    align-items: stretch;
  }

  /* Button row */
  .rowbut {
    /*Alignments*/
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Margin,Padding,Gaps */
    gap: 1rem;
    width: 100%;
  }

  .rowbut button {
    /*Alignments*/
    flex: 1 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-wrap: wrap;

    /* Margin,Padding,Gaps */
    gap: 10px;
    width: 80%;
  }

  .outbox {
    padding: 8px;
    margin: 8px 0;
  }
}