/* =========================
   LAYOUT (Main Container)
   ========================= */
.a10-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 */
.a10-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);
}

.a10-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) */
.a10-rowinp {
    /*Alignments*/
    display: flex;
    flex-direction: row;
    justify-content: center;

    /* Margin,Padding,Gaps */
    width: 100%;
    gap: 1.5rem;
}

/* Image styling */
.a10-rowinpcir img {
    max-width: 350px !important;
    height: auto !important;
}

.a10-colinprin,
.a10-colinprf,
.a10-colinpvolt,
.a10-colinpsup {
    /*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);
}

.a10-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 */
}

.a10-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;
}

.a10-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;
}

/* Button row */
.a10-rowbut {
    /*Alignments*/
    display: flex;
    justify-content: center;

    /* Margin,Padding,Gaps */
    gap: 0.5rem;
}


/* =========================
   OUTPUT SECTION
   ========================= */
/* Rows inside ( side by side) */
.a10-rowout {
    /*Alignments*/
    flex: 1 1;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Margin,Padding,Gaps */
    gap: 1.5rem;
    padding: 2%;
    width: 100%;
}

.a10-rowoutgain,
.a10-rowoutvolt {
    /*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 */
.a10-rowoutgain img,
.a10-rowoutvolt img {
    /* Margin,Padding,Gaps */
    max-width: 75px !important;
    height: auto !important;
}

.a10-coloutfield {
    /*Alignments*/
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Margin,Padding,Gaps */
    gap: 1rem;
    padding: 3%;
}

.a10-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;
}

.a10-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;
}

.a10-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 */
}

.a10-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
   ========================= */
.a10-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;
}

#a10-submit {
    /*Color,Border,Shadows */
    background-color: #c1d82a;
}

#a10-submit:hover,
#a10-submit:active {
    /*Color,Border,Shadows */
    color: #fffdfd;
    background-color: #889d13;
}

#a10-reset {
    /*Color,Border,Shadows */
    background-color: #fbb7b0;
}

#a10-reset:hover,
#a10-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
   ========================= */
.a10-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);
}

.a10-sandclock {
    /* Margin,Padding,Gaps */
    width: 100px;
    /* adjust size of your GIF */
    height: 100px;
}

/* =========================
   Custom Alert messages
   ========================= */
/* Overlay */
.a10-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 */
.a10-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 */
#a10-customAlertIcon {
    /*Alignments*/
    display: block;

    /* Margin,Padding,Gaps */
    margin-bottom: 10px;

    /*Color,Border,Shadows */
    font-size: 28px;
}

/* Message */
#a10-customAlertMsg {
    /*Alignments*/
    display: block;

    /* Margin,Padding,Gaps */
    margin-bottom: 20px;

    /*Color,Border,Shadows */
    font-size: 16px;
}

/* Button */
#a10-customAlertBtn {
    /* Special Parameters */
    cursor: pointer;

    /* Margin,Padding,Gaps */
    padding: 6px 14px;

    /*Color,Border,Shadows */
    border: none;
    border-radius: 6px;
    background: #ec3f3f;
    color: #fff;
}

#a10-customAlertBtn:hover {
    /* Special Parameters */
    filter: brightness(1.1);
}

/* =========================
   INFO BUTTON (popup trigger)
   ========================= */
.a10-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) */
.a10-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);
}

.a10-popup-overlay.a10-open {
    /*Alignments*/
    display: flex;
}

/* show + center */

/* Popup box */
.a10-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 */
.a10-popup-box h3 {
    margin: 0 0 6px;
}

.a10-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 */
.a10-rows {
    /*Alignments*/
    display: flex;
    flex-direction: column;

    /* Margin,Padding,Gaps */
    gap: 10px;
}

.a10-definition,
.a10-formula,
.a10-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;
}

.a10-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 */
}

.a10-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 */
}

.a10-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 */
}

.a10-derivation img {
    max-width: 350px !important;
    height: auto !important;
}

.a10-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 */
.a10-footer {
    /*Alignments*/
    display: flex;
    justify-content: flex-end;

    /* Margin,Padding,Gaps */
    gap: 8px;
}

.a10-btn-primary {
    /* Special Parameters */
    cursor: pointer;

    /* Margin,Padding,Gaps */
    border: 0;
    padding: 8px 14px;

    /*Color,Border,Shadows */
    color: #ffffff;
    border-radius: 6px;
    background: #2b8a3e;
}

.a10-btn.a10-primary:hover {
    filter: brightness(1.05);
}

/* =========================
   RESPONSIVE TWEAKS
   ========================= */
/* Responsive tweaks */
@media (max-width: 768px) {
    .a10-rowinp {
        /*Alignments*/
        /* stack cards vertically */
        flex-direction: column;
        align-items: stretch;
    }

    /* Button row */
    .a10-rowbut {
        /*Alignments*/
        display: flex;
        flex-direction: column;
        align-items: center;

        /* Margin,Padding,Gaps */
        gap: 1rem;
        width: 100%;
    }

    .a10-rowbut button {
        /*Alignments*/
        flex: 1 1;
        display: flex;
        flex-direction: column;
        align-items: center;

        /* Margin,Padding,Gaps */
        gap: 10px;
        width: 80%;
    }

    .a10-rowoutgain,
    .a10-rowoutvolt {
        /*Alignments*/
        display: flex;
        flex-direction: column;
        min-width: 250px;
    }
}