/* =========================
   LAYOUT (Main Container)
   ========================= */
.a6-container {
  /*Alignments*/
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;

  /* Margin,Padding,Gaps */
  gap: 5px;
  margin: 5px;
  padding: 5px;

  /*Color,Border,Shadows */
  border-radius: 8px;
  background: #fafafa;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
}

/* General container for input/output sections */
.a6-colinp {
  /*Alignments*/
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  padding: 2%;
  gap: 1.5rem;
  max-width: 100%;

  /*Color,Border,Shadows */
  border: 2px groove #ddd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.a6-colout {
  /*Alignments*/
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  max-width: 100%;
  padding: 1%;

  /*Color,Border,Shadows */
  border: 2px groove #ddd;
  border-radius: 6px;
  background: #f6f3f3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/*  ===============================================
   INPUT SECTION
    =============================================== */
/* Rows inside (inductor + capacitor side by side) */
.a6-rowinp {
  /*Alignments*/
  display: flex;
  flex-direction: row;
  justify-content: center;

  /* Margin,Padding,Gaps */
  width: 100%;
  gap: 1.5rem;
}

/* Image styling */
.a6-rowinpswg img {
  max-width: 250px !important;
  height: auto !important;
}

.a6-colinpswg,
.a6-colinpradio {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  /* Margin,Padding,Gaps */
  gap: 1rem;
  padding: 1.0rem;

  /*Color,Border,Shadows */
  border: 2px groove #ddd;
  border-radius: 8px;
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Input fields */
.a6-colinpswg input,
.a6-colinpswg select {
  /* Margin,Padding,Gaps */
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.4rem;

  /*Color,Border,Shadows */
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.a6-material-select {
  /*Alignments*/
  display: flex;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1rem; /* spacing between buttons */
}

/* Button row */
.a6-rowbut {
  /*Alignments*/
  display: flex;
  justify-content: center;

  /* Margin,Padding,Gaps */
  gap: 0.5rem;
}

/* =========================
   OUTPUT SECTION
   ========================= */
/* Rows inside ( side by side) */
.a6-rowout {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1.5rem;
  padding: 2%;
  width: 100%;
}

.a6-rowoutdia,
.a6-rowoutres,
.a6-rowoutamp {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  /* Margin,Padding,Gaps */
  gap: 1rem;
  padding: 1%;
  width: 95%;
  min-width: 320px;

  /*Color,Border,Shadows */
  border: 2px groove #ddd;
  border-radius: 8px;
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Image styling */
.a6-rowoutdia img,
.a6-rowoutres img,
.a6-rowoutamp img {
  /* Margin,Padding,Gaps */
  max-width: 75px !important;
  height: auto !important;
}

.a6-coloutfield {
  /*Alignments*/
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1rem;
  padding: 3%;
}

.a6-output-with-unit {
  /*Alignments*/
  display: flex;
  align-items: stretch;
  /* ensure both children have same height */

  /* Margin,Padding,Gaps */
  min-width: 200px;
  height: 40px;

  /*Color,Border,Shadows */
  overflow: hidden;
  /* keeps rounded corners clean */
  border-radius: 6px;
  border: 1px solid #ccc;
}

.a6-output-with-unit output {
  /*Alignments*/
  flex: 4 1 0;
  /* grow:4 shrink:1 basis:0 -> approx 66% vs select*/
  display: flex;
  /* make output a flex container */
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* horizontal center */

  /* Margin,Padding,Gaps */
  width: 0;
  /* important with flex-basis:0 so flex decides size */
  min-width: 0;
  /* allow shrink inside flex container */
  margin: 0;
  height: 100%;
  /* match select height */

  /*Color,Border,Shadows */
  border: none;
  outline: none;
  font-size: medium;
  font-weight: 500;
}

.a6-output-with-unit span {
  /* Special Parameters */
  cursor: pointer;

  /*Alignments*/
  text-align: center;
  flex: 2 1 0;
  /* grow:2 shrink:1 basis:0 -> approx 33% */

  /* Margin,Padding,Gaps */
  padding: 10px;

  /*Color,Border,Shadows */
  border: none;
  outline: none;
  border-radius: 6px;
  background: #f5f5f5;
  font-weight: 500;
}


/* ===============================================
   UTILITIES
   =============================================== */

h2 {
  /*Alignments*/
  text-align: center;
  /* center aligned */
  letter-spacing: 0.5px;
  /* slightly spaced text */

  /* Margin,Padding,Gaps */
  margin-bottom: 15px;
  /* space below heading */
  padding-bottom: 5px;
  /* spacing for underline */

  /*Color,Border,Shadows */
  color: #2c3e50;
  /* dark blue-gray */
  border-bottom: 2px solid #8d8989;
  /* subtle underline */
  font-size: 1.5rem;
  /* balanced size */
  font-weight: 600;
  /* semi-bold */
}

.a6-container label {
  /*Alignments*/
  display: block;
  /* make it a block element */

  /* Margin,Padding,Gaps */
  padding: 10px;

  /*Color,Border,Shadows */
  color: #000;
  font-size: large;
  font-family: "Times New Roman", Times, serif;
}

/* =========================
   BUTTONS
   ========================= */
.a6-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;
}

#a6-submit {
  /*Color,Border,Shadows */
  background-color: #c1d82a;
}

#a6-submit:hover,
#a6-submit:active {
  /*Color,Border,Shadows */
  color: #fffdfd;
  background-color: #889d13;
}

#a6-reset {
  /*Color,Border,Shadows */
  background-color: #fbb7b0;
}

#a6-reset:hover,
#a6-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);
}

/* =========================
   Loading Effect
   ========================= */
.a6-loading-popup {
  /* Special Parameters */
  transform: translate(-50%, -50%);

  /*Alignments*/
  display: none;
  /* hidden initially */
  text-align: center;

  /* Margin,Padding,Gaps */
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2000;
  padding: 20px;

  /*Color,Border,Shadows */
  border-radius: 80px;
  background: rgba(255, 255, 255, 0.7);
  /* 90% opaque white */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.a6-sandclock {
  /* Margin,Padding,Gaps */
  width: 100px;
  /* adjust size of your GIF */
  height: 100px;
}

/* =========================
   Custom Alert messages
   ========================= */
/* Overlay */
.a6-custom-alert {
  /*Alignments*/
  display: none;
  /* hidden by default */
  justify-content: center;
  align-items: center;

  /* Margin,Padding,Gaps */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;

  /*Color,Border,Shadows */
  background: rgba(0, 0, 0, 0.4);
}

/* Box */
.a6-custom-alert-box {
  /*Alignments*/
  text-align: center;

  /* Margin,Padding,Gaps */
  padding: 20px 30px;
  min-width: 280px;

  /*Color,Border,Shadows */
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Icon */
#a6-customAlertIcon {
  /*Alignments*/
  display: block;

  /* Margin,Padding,Gaps */
  margin-bottom: 10px;

  /*Color,Border,Shadows */
  font-size: 28px;
}

/* Message */
#a6-customAlertMsg {
  /*Alignments*/
  display: block;

  /* Margin,Padding,Gaps */
  margin-bottom: 20px;

  /*Color,Border,Shadows */
  font-size: 16px;
}

/* Button */
#a6-customAlertBtn {
  /* Special Parameters */
  cursor: pointer;

  /* Margin,Padding,Gaps */
  padding: 6px 14px;

  /*Color,Border,Shadows */
  border: none;
  border-radius: 6px;
  background: #ec3f3f;
  color: #fff;
}

#a6-customAlertBtn:hover {
  /* Special Parameters */
  filter: brightness(1.1);
}

/* =========================
   RESPONSIVE TWEAKS
   ========================= */
/* Responsive tweaks */
@media (max-width: 768px) {
  .a6-rowinp {
    /*Alignments*/
    /* stack cards vertically */
    flex-direction: column;
    align-items: stretch;
  }

  /* Button row */
  .a6-rowbut {
    /*Alignments*/
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Margin,Padding,Gaps */
    gap: 1rem;
    width: 100%;
  }

  .a6-rowbut button {
    /*Alignments*/
    flex: 1 1;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Margin,Padding,Gaps */
    gap: 10px;
    width: 80%;
  }

  .a6-rowoutdia,
  .a6-rowoutres,
  .a6-rowoutamp {
    /*Alignments*/
    display: flex;
    flex-direction: column;
    min-width: 250px;
  }
}