body {
    /* font-family: 'Arial', sans-serif; */
    background-color: #f9f9f9;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header h1 {
    font-size: 24px;
    font-weight: bold;
}

.content {
    flex: 1;
}


/* Default to paused */
#moving-bar {
    animation-play-state: paused;
    max-width: 100%; 
    overflow: hidden; 
    transition: width 0.3s ease-in-out; 
}
  
@keyframes moveBar {
    0% { left: 0; }
    50% { left: calc(100% - 50px); }
    100% { left: 0; }
}

/* @media (max-width: 768px) {
    #moving-bar, #connection-line {
        display: none;
    }
} */

@media (max-width: 486px) {
    #moving-bar, #connection-line {
        display: none;
    }
}

.chart-container canvas {
    max-width: 100%; 
    height: 100%;
}

.row {
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    position: relative;
    justify-content: center;
    align-items: center;
}

.chart-container {
    max-width: 75%;
    width: 100%;
    height: 120px;
    position: relative;
}

.result-label {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

#results {
    display: block;
    margin: 20px auto;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 600px;
    text-align: left;
}
#results p {
    margin: 10px 0;
    font-size: 16px;
}

/* .container {
    max-width: 90%;
    margin: auto;
    margin-top: 30px;
} */

.container2 {
    max-width: 85%;
    margin: auto;
    margin-top: 30px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 30px;
    padding-top: 20px;
}

.fa-regular {
    font-size: 1.5rem;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.5s ease-out;
    padding: 20px;
    border-left: 4px solid;
}


.card-content {
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.icon-container {
    padding: 12px;
    border-radius: 10px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.card-value {
    display: flex;
    align-items: baseline;
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

.value {
    font-size: 28px;
    font-weight: bold;
}

.unit {
    margin-left: 5px;
    font-size: 16px;
    color: gray;
}

.progress-bar {
    margin-top: 10px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
}

/* Colors */
.border-blue { border-color: #3b82f6; }
.border-green { border-color: #10b981; }
.border-purple { border-color: #8b5cf6; }
.border-amber { border-color: #f59e0b; }

.bg-blue { background-color: #dbeafe; }
.bg-green { background-color: #d1fae5; }
.bg-purple { background-color: #ede9fe; }
.bg-amber { background-color: #fef3c7; }

.svg.blue { color: #3b82f6; }
.svg.green { color: #10b981; }
.svg.purple { color: #8b5cf6; }
.svg.amber { color: #f59e0b; }

.progress-fill.blue { background-color: #3b82f6; }
.progress-fill.green { background-color: #10b981; }
.progress-fill.purple { background-color: #8b5cf6; }
.progress-fill.amber { background-color: #f59e0b; }

/* Animation for showing cards */
#grid-results .card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}


.transition-all {
    transition: all 0.5s ease-out;
}


/* General styling for the button container */
#start-test-container {
    margin-top: 50px; /* Default margin for desktop */
    height: auto;
}


.button-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px;
}

/* START TEST BUTTON - Responsive */
.btn-start {
    background-color: #003065;
    color: white;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    animation: float 2s infinite ease-in-out;
    padding: 0;
}

.btn-start:hover {
    background-color: green;
    border: 4px solid #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* Ripple Effect (ONLY FOR START TEST) */
.ripple-effect {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(30, 58, 136, 0.2);
    z-index: 1;
    animation: ripple 1.5s infinite ease-out;
}

/* Running Test (Download) */
/* .btn-download {
    background:  #2689f3; 
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    width: 250px;
    height: 70px;
    border-radius: 10px; 
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 65px;
} */

.btn-download {
    background:  transparent; 
    color: #2689f3;
    font-size: 1.5rem;
    font-weight: bold;
    /* width: 250px; */
    height: 70px;
    border-radius: 10px; 
    border: none;
    cursor: not-allowed;
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 65px;
}
 
.finished-display {
    margin-top: 12px;
    padding: 10px 14px;
    /* background-color: #cdcdcd45; */
    background-color: #cdcdcd33;
    border: .5px solid #cbcbcb;
    border-radius: 8px;
    font-size: 15px;
    color: #334155;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 200px;
    margin-bottom: .5rem;
  }
  

.border-gray { border-color: #6b7280; }
.bg-gray     { background-color: #e5e7eb; }


.btn-download i {
    font-size: 1.5rem;
}

/* Running Test (Upload) */
/* .btn-upload {
    background:  #42b35c;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    width: 250px;
    height: 70px;
    border-radius: 10px; 
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 65px;
} */

.btn-upload {
    background:  transparent;
    color: #42b35c;
    font-size: 1.5rem;
    font-weight: bold;
    /* width: 250px; */
    height: 70px;
    border-radius: 10px; 
    border: none;
    cursor: not-allowed;
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 65px;
}

.btn-upload i {
    font-size: 1.5rem;
}


/* Define keyframes for the fade-in and scale animation */
@keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(0.7);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  

/* Running Test Again */
.btn-again {
    background-color: #003065;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    width: 250px;
    height: 70px;
    border-radius: 10px; 
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer; 
    animation: fadeInScale 1s ease-out forwards; /* Add pulse animation */
    display: flex !important; /* Override previous display */
    flex-direction: row !important; /* Ensure row alignment */
    align-items: center;
    justify-content: center;
    margin-top: 75px;
    gap: 8px; 
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out; /* Smooth transitions */
}


.btn-again i {
    font-size: 1.5rem;
}

.btn-again:hover {
    background-color: rgb(4, 141, 4); 
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Define keyframes for the fade-in and scale animation */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.d-none {
    display: none;
  }

/* Floating Animation for Start Test */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}


/* Ripple animation */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: .8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}


@media (max-width: 768px) {
    #start-test-container {
        height: auto;
        margin-top: 0;
        margin-bottom: 0;
        padding: 10px 0;
    }
}


@media (max-width: 576px) {
    .page-header.page-header--image-overlapping {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }

    .btn-primary {
        margin-top: 10px;
        margin-bottom: 10px; 
    }
}

@media (max-width: 768px) {
    .global-header__site-search-wrapper {
        display: none !important;
    }
}


/* Remove any extra space or alignment issues on the wrapper */
.page-header__image-wrapper {
    margin: 0;
    padding: 0;
    width: 100%; 
    height: auto;
    background-size: cover;
    background-position: center; 
    background-repeat: no-repeat;
}

/* Debugging helper - Add borders to visualize alignment */
.page-header__image, 
.page-header__image-wrapper {
    border: 1px solid red; 
}

.my-4-custom {
    margin-top: 0;
    margin-bottom: 1.5rem !important;
  }
  .col-md-4, .col-6 {
      padding: 5px;
  }
  .box {
      padding: 10px;
      background-color: transparent;
      margin: 4px;
      text-align: center;
      border: 1px solid lightgray;
      border-radius: 10px;
      box-sizing: border-box;
      flex: 1 1 calc(10% - 20px);
  }

.page-header.hero {
    position: relative;
    /* background: linear-gradient(135deg, #003065 0%, #0057A5 100%); */
    background: linear-gradient(172deg, #002e58 46.22%, #f3b75c);
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  }
  
  .page-header.hero .hero__overlay {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.08);
  }
  
  .hero__title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.1;
  }
  
  .hero__subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
  }
  

  
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(243, 244, 246, .45);
    z-index: 1000; 
  }
  .spinner {
    height: 70px;
    width: 70px;
    color: #002e58;
  }
  
.iframe-overlay {
    position: absolute;
    width: 100%;
    height: 97%;
    top: 0; 
    left: 0;
    background-color: #002e58;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    flex-direction: column;
    padding-right: 10rem;
    width: 100%;
    height: 100%;
    border-radius: 10px;
  } 
  
.iframe-container {
    position: relative;
    /* min-height: 600px;   
    height: auto;        
    overflow: visible;   */
}

/* @media (min-width: 769px) {
    .iframe-container {
      min-height: 600px;
    }
} */

@media (max-width: 768px) {
  .iframe-overlay {
      font-size: 1.2rem;
      padding-right: 1rem;
  }
}

@media (max-width: 480px) {
  .iframe-overlay {
      font-size: 1rem; 
      padding-right: 1rem;
  }
}

@media (max-width: 768px) {
    .grid-container {
        gap: 15px;
        padding-top: 10px;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .title {
        font-size: 16px;
    }

    .value {
        font-size: 24px;
    }

    .unit {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .btn-download, .btn-upload, .btn-again{
        width: 180px;
        height: 50px;
        font-size: 1.1rem;
        /* margin: 20px auto; */
    }
}


@media (max-width: 768px) {
    .chart-container {
        max-width: 100%;
        height: 120px;
    }
}

/* @media (max-width: 768px) {
    .iframe-container {
        width: 100%;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .iframe-container {
        height: 300px;
    }
} */

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    header h1 {
        font-size: 20px;
    }

    #results p {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .spinner {
        height: 50px;
        width: 50px;
    }

    .iframe-overlay {
        font-size: 1.2rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .spinner {
        height: 40px;
        width: 40px;
    }

    .iframe-overlay {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .fa-regular {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .ripple-effect {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .btn-start {
        border-radius: 50%;
        width: 180px;
        height: 180px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .btn-download, .btn-upload, .btn-again  {
        margin-top: 120px;
    }
}

.content.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px;
    min-height: 600px; 
    position: relative;
}

@media (max-width: 768px) {
    .content.container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 12px;
        min-height: 52F0px; 
    }
}

@media (max-width: 768px) {
    #server-location-text {
        max-width: 130px;
        word-wrap: break-word;
        word-break: break-word;
        margin-left: 0px !important;
    }
}

/* Server Picker Styling */
.server-picker {
  display:flex; gap:.75rem; align-items:center; justify-content:center;
  margin-top:.5rem; margin-bottom:.5rem;
}
.server-label {
  color:#003065; font-weight:700; font-size:.95rem; display:flex; gap:.4rem; align-items:center;
}
.server-toggle {
  display:flex; gap:.35rem;
  background:#fff; border:1px solid #e5e7eb; border-radius:9999px; padding:.25rem;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.server-option { position:relative; }
.server-option input {
  position:absolute; inset:0; opacity:0; pointer-events:none;
}
.server-chip {
  display:flex; align-items:center; gap:.6rem;
  padding:.55rem .9rem; border-radius:9999px; font-weight:600;
  color:#334155; line-height:1;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .05s ease;
}
.server-text { display:flex; flex-direction:column; line-height:1.1; text-align:left; }
.server-main { font-weight:700; font-size:.9rem; }
.server-sub { font-weight:500; opacity:.75; font-size:.78rem; margin-top:1px; }
.rec-tag {
  margin-left:.3rem; font-size:.7rem; font-weight:700; letter-spacing:.2px;
  background:#fde68a; color:#7c5600; padding:.1rem .4rem; border-radius:9999px;
}

/* Selected */
.server-option input:checked + .server-chip {
  background:#003065; color:#fff;
  box-shadow:0 2px 10px rgba(0,48,101,.25);
}
.server-option input:checked + .server-chip .server-sub { color:#e5e7eb; opacity:.9; }

/* Hover & active */
.server-option:hover .server-chip { transform: translateY(-1px); }
.server-option:active .server-chip { transform: translateY(0); }

/* Disabled during test */
.server-toggle.disabled {
  opacity:0.7; pointer-events:none; filter:grayscale(0.3);
}

/* Mobile */
@media (max-width:640px){
  .server-sub{display:none;}
}

.server-header {
  display:flex; align-items:center; justify-content:center;
  gap:.5rem; color:#003065; font-weight:700;
  font-size:1rem; margin-bottom:.5rem;
}
.server-header i { font-size:1.1rem; }

/* make the white card a positioning context */
.test-card { position: relative; }

/* pin the picker at bottom-center of card */
#server-picker {
  position: absolute;
  left: 50%;
  bottom: 20px;                 /* distance from bottom edge */
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;       /* header above pills */
  align-items: center;
  gap: .4rem;
  z-index: 10;
}

/* header style (stacked above) */
#server-picker .server-header {
  display: flex; align-items: center; justify-content: center;
  gap: .4rem; color:#003065; font-weight:700; font-size:1rem;
}

/* keep your existing pill styles; a couple safe tweaks for tight space */
#server-picker .server-toggle { 
  display:flex; gap:.35rem; background:#fff; border:1px solid #e5e7eb;
  border-radius:9999px; padding:.25rem; box-shadow:0 1px 3px rgba(0,0,0,.06);
}

/* mobile: nudge up a bit to avoid overflow and simplify labels */
@media (max-width: 640px) {
  #server-picker { bottom: 12px; }
  #server-picker .server-sub { display:none; }
}

/* placements */
#server-picker.picker-pinned {
  position:absolute; left:50%; bottom:18px; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:.4rem; z-index:10;
}
#server-picker.picker-inline {
  position:static; transform:none;
  margin-top:25px; margin-bottom:35px;
}
/* hidden helper */
.is-hidden { display:none !important; }




/* Responsive button sizes */
@media (min-width: 640px) {
    .btn-start {
        width: 200px;
        height: 200px;
        border: 3.5px solid white;
    }
}

@media (min-width: 768px) {
    .btn-start {
        width: 220px;
        height: 220px;
    }
}

@media (min-width: 1024px) {
    .btn-start {
        width: 250px;
        height: 250px;
        border: 4px solid white;
    }
}

/* Smooth transitions for form fields */
.fi-fo-field-wrp {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Red background only for the input, not the icon */
.cleared-address-field input {
    background: #fefefe !important;
}

/* Keep icon wrapper background white - prefix (left icon) */
.cleared-address-field .fi-input-wrp-prefix {
    background-color: white !important;
}

/* Keep icon wrapper background white - suffix (right restore button) */
.cleared-address-field .fi-input-wrp-suffix {
    background-color: white !important;
}

/* Red helper text for cleared address field */
.cleared-address-field ~ .fi-fo-helper-text {
    color: #ef4444 !important;
    font-weight: 500;
}

/* Enhance the cleared state field */
input[disabled] {
    cursor: not-allowed;
    opacity: 1 !important;
}

/* Animate the suffix actions */
.fi-input-wrp-suffix button {
    transition: all 0.2s ease;
}

.fi-input-wrp-suffix button:hover {
    transform: scale(1.1);
}

.fi-input-wrp-suffix button:active {
    transform: scale(0.95);
}

/* Smooth fade in/out for helper text */
.fi-fo-helper-text {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Add focus ring enhancement */
.fi-input:focus-within {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    transition: box-shadow 0.2s ease;
}
