/* =========================
   LAYOUT (Main Container)
   ========================= */
.a11-container {
  /*Alignments*/
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;

  /* Margin,Padding,Gaps */
  /* gap: 5px; */
  margin: 5px;
  padding: 5px;

  /*Color,Border,Shadows */
  border: 2px groove #ddd;
  border-radius: 8px;
  background: #fafafa;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
}

/* General container for input/output sections */
.a11-colleft,
.a11-colright {
  /*Alignments*/
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  padding: 2%;
  gap: 0.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);
}

/* General container for input/output sections */
.a11-output {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 0.1rem;
  padding: 2%;
  margin-top: 5%;
  width: 100%;

  /*Color,Border,Shadows */
  /* border: 2px groove #ddd; */
  border: 2px groove #ddd;
  border-radius: 8px;
  background: #e6e6e6;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.08);
}

/*  ===============================================
   INPUT SECTION
    =============================================== */

.a11-rowinp {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1.5rem;
  padding: 2%;
  width: 100%;
}

.a11-rowinpload,
.a11-rowinptime,
.a11-rowinpvolt,
.a11-rowinpbtype,
.a11-rowinpceff,
.a11-rowinpmargin {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  /* Margin,Padding,Gaps */
  gap: 0.5rem;
  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 */
.a11-rowinpload img,
.a11-rowinptime img,
.a11-rowinpvolt img,
.a11-rowinpbtype img,
.a11-rowinpceff img,
.a11-rowinpmargin img {
  /* Margin,Padding,Gaps */
  max-width: 75px !important;
  height: auto !important;
}

.a11-rowinpbtype 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;
}

.a11-colinpfield {
  /*Alignments*/
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1rem;
  padding: 3%;
}

.a11-input-with-unit {
  /*Alignments*/
  display: flex;
  align-items: stretch;
  /* ensure both children have same height */

  /* Margin,Padding,Gaps */
  width: 100%;
  min-width: 200px;

  /*Color,Border,Shadows */
  overflow: hidden;
  /* keeps rounded corners clean */
}

.a11-input-with-unit input {
  /*Alignments*/
  flex: 4 1 0;
  /* grow:4 shrink:1 basis:0 -> approx 66% vs select*/

  /* Margin,Padding,Gaps */
  width: 0;
  /* important with flex-basis:0 so flex decides size */
  min-width: 0;
  /* allow shrink inside flex container */
  height: 100%;
  /* match select height */
  padding: 10px;

  /*Color,Border,Shadows */
  outline: none;
  border: 1px groove #ddd;
  border-radius: 6px 0 0 6px;
}

.a11-input-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;
}

.a11-input-with-unit select {
  /* Special Parameters */
  cursor: pointer;

  /*Alignments*/
  flex: 2 1 0;
  /* grow:2 shrink:1 basis:0 -> approx 33% */
  text-align: center;

  /* Margin,Padding,Gaps */
  padding: 10px;

  /*Color,Border,Shadows */
  background: #f5f5f5;
  font-weight: 500;
  border: 1px groove #ddd;
  border-radius: 0 6px 6px 0;
}

/* =========================
   OUTPUT SECTION
   ========================= */
/* Rows inside ( side by side) */
.a11-rowout {
  /*Alignments*/
  flex: 1 1;
  display: flex;
  flex-direction: row;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1.5rem;
  padding: 2%;
  width: 100%;
}

.a11-rowoutbatt,
.a11-rowoutener {
  /*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: 4px 4px 4px 4px rgba(0, 0, 0, 0.05);
}

/* Image styling */
.a11-rowoutbatt img,
.a11-rowoutener img {
  /* Margin,Padding,Gaps */
  max-width: 75px !important;
  height: auto !important;
}

.a11-coloutfield {
  /*Alignments*/
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Margin,Padding,Gaps */
  gap: 1rem;
  padding: 3%;
}

.a11-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;
}

.a11-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;
}

.a11-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;
}

/* =========================
   BUTTONS
   ========================= */
.a11-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;
}

#a11-submit {
  /*Color,Border,Shadows */
  background-color: #c1d82a;
}

#a11-submit:hover,
#a11-submit:active {
  /*Color,Border,Shadows */
  color: #fffdfd;
  background-color: #889d13;
}

#a11-reset {
  /*Color,Border,Shadows */
  background-color: #fbb7b0;
}

#a11-reset:hover,
#a11-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);
}

/* ===============================================
   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 */
}

.a11-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;
}

/* =========================
   Loading Effect
   ========================= */
.a11-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);
}

.a11-sandclock {
  /* Margin,Padding,Gaps */
  width: 100px;
  /* adjust size of your GIF */
  height: 100px;
}

/* =========================
   Custom Alert messages
   ========================= */
/* Overlay */
.a11-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 */
.a11-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 */
#a11-customAlertIcon {
  /*Alignments*/
  display: block;

  /* Margin,Padding,Gaps */
  margin-bottom: 10px;

  /*Color,Border,Shadows */
  font-size: 28px;
}

/* Message */
#a11-customAlertMsg {
  /*Alignments*/
  display: block;

  /* Margin,Padding,Gaps */
  margin-bottom: 20px;

  /*Color,Border,Shadows */
  font-size: 16px;
}

/* Button */
#a11-customAlertBtn {
  /* Special Parameters */
  cursor: pointer;

  /* Margin,Padding,Gaps */
  padding: 6px 14px;

  /*Color,Border,Shadows */
  border: none;
  border-radius: 6px;
  background: #ec3f3f;
  color: #fff;
}

#a11-customAlertBtn:hover {
  /* Special Parameters */
  filter: brightness(1.1);
}

/* =========================
   INFO BUTTON (popup trigger)
   ========================= */
.a11-info-btn {
  /* Special Parameters */
  animation: pulseAnim 1.2s ease-in-out infinite;
  cursor: pointer;

  /*Alignments*/
  text-align: center;

  /* Margin,Padding,Gaps */
  padding: 0;
  width: 20px;
  height: 20px;
  border: none;
  margin-left: 6px;
  border-radius: 50%;

  /*Color,Border,Shadows */
  color: #ffffff;
  background: #a9ce1a;
  font-size: 12px;
  font-weight: bold;
  line-height: 20px;
}

@keyframes pulseAnim {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

/* =========================
   POPUP STYLES
   ========================= */
/* Overlay (hidden by default) */
.a11-popup-overlay {
    /*Alignments*/
    position: fixed;
    display: none;
    /* hidden until opened */
    align-items: center;
    /* center Y */
    justify-content: center;
    /* center X */

    /* Margin,Padding,Gaps */
    z-index: 1000;
    inset: 0;

    /*Color,Border,Shadows */
    background: rgba(0, 0, 0, 0.6);
}

.a11-popup-overlay.a11-open {
    /*Alignments*/
    display: flex;
}

/* show + center */

/* Popup box */
.a11-popup-box {
    /*Alignments*/
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: auto;
    /* scroll inside if content grows */

    /* Margin,Padding,Gaps */
    width: min(700px, 90vw);
    max-height: 85vh;
    padding: 20px;
    gap: 16px;

    /*Color,Border,Shadows */
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Title & close */
.a11-popup-box h3 {
    margin: 0 0 6px;
}

.a11-close {
    /* Special Parameters */
    cursor: pointer;
    position: absolute;

    /* Margin,Padding,Gaps */
    top: 10px;
    right: 12px;
    border: 0;
    width: 28px;
    height: 28px;

    /* Center the text perfectly */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Visuals */
    color: #333;
    background: #ff7272;
    border-radius: 50%;
    font-size: 16px;
}

/* Rows */
.a11-rows {
    /*Alignments*/
    display: flex;
    flex-direction: column;

    /* Margin,Padding,Gaps */
    gap: 10px;
}

.a11-definition,
.a11-formula,
.a11-derivation {
    /*Alignments*/
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    /* Margin,Padding,Gaps */
    gap: 12px;
    padding: 10px 12px;

    /*Color,Border,Shadows */
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.a11-heading {
    /*Alignments*/
    text-align: center;
    /* center aligned */

    /* Margin,Padding,Gaps */
    margin-bottom: 15px;
    /* space below heading */
    padding-bottom: 5px;
    /* spacing for underline */
    letter-spacing: 0.5px;
    /* slightly spaced text */

    /*Color,Border,Shadows */
    font-size: 1.5rem;
    /* balanced size */
    font-weight: 600;
    /* semi-bold */
    color: #5a9925;
    /* dark blue-gray */
}

.a11-value {
    /*Alignments*/
    text-align: center;
    /* center aligned */

    /* Margin,Padding,Gaps */
    margin-bottom: 15px;
    /* space below heading */
    padding-bottom: 5px;
    /* spacing for underline */
    letter-spacing: 0.5px;
    /* slightly spaced text */

    /*Color,Border,Shadows */
    font-size: 1.2rem;
    /* balanced size */
    font-weight: 700;
    /* semi-bold */
    color: #000000;
    /* dark blue-gray */
}

.a11-derivation {
    /*Alignments*/
    text-align: start;
    /* center aligned */

    /* Margin,Padding,Gaps */
    margin-bottom: 15px;
    /* space below heading */
    padding-bottom: 5px;
    /* spacing for underline */
    letter-spacing: 0.5px;
    /* slightly spaced text */

    /*Color,Border,Shadows */
    font-size: 1.2rem;
    /* balanced size */
    font-weight: 400;
    /* semi-bold */
    color: #000000;
    /* dark blue-gray */
}

.a11-derivation img {
    max-width: 350px !important;
    height: auto !important;
}

.a11-row {
    /*Alignments*/
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    /* Margin,Padding,Gaps */
    gap: 12px;
    padding: 10px 12px;

    /*Color,Border,Shadows */
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

/* Footer */
.a11-footer {
    /*Alignments*/
    display: flex;
    justify-content: flex-end;

    /* Margin,Padding,Gaps */
    gap: 8px;
}

.a11-btn-primary {
    /* Special Parameters */
    cursor: pointer;

    /* Margin,Padding,Gaps */
    border: 0;
    padding: 8px 14px;

    /*Color,Border,Shadows */
    color: #ffffff;
    border-radius: 6px;
    background: #2b8a3e;
}

.a11-btn.a11-primary:hover {
    filter: brightness(1.05);
}
