/* ===================================
   ONLINE COMPLETION SECTION
   =================================== */

.insurance-online-completion {
  max-width: 1200px;
  margin: 80px auto 60px;
  padding: 0;
}

.insurance-online-completion__container {
  text-align: center;
  padding: 0; /* No horizontal padding - title and subtitle handle their own spacing */
}

.insurance-online-completion__title {
  font-size: 34px;
  font-weight: 700;
  color: #2e2e2e;
  margin-bottom: 16px;
  line-height: 1.3;
  padding: 0 40px; /* Add padding to title for spacing */
}

.insurance-online-completion__subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.5;
  padding: 0 40px; /* Add padding to subtitle for spacing */
}

.insurance-online-completion__subtitle strong {
  color: #22aea1;
  font-weight: 700;
}

/* iFrame Card */
.insurance-iframe-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: none;
  border-top: 2px solid #4fc3cf;
  border-bottom: 2px solid #4fc3cf;
  border-radius: 0;
  padding: 32px 0;
  box-shadow: 0 8px 32px rgba(79, 195, 207, 0.15);
  position: relative;
  overflow: hidden;
}

@supports not (backdrop-filter: blur(10px)) {
  .insurance-iframe-card {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* iFrame Wrapper */
.insurance-iframe-wrapper {
  position: relative;
  width: 100%;
  min-height: 600px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

/* iFrame */
.insurance-iframe {
  width: 100%;
  min-height: 600px;
  height: 100%;
  border: none;
  display: block;
  background: #ffffff;
}

/* Loading Spinner */
.insurance-iframe-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.loader-text {
  margin-top: 24px;
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

/* Spinner Animation (from Vigo implementation) */
.spinner {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.spinner div {
  animation: spinner-rotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}

.spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22aea1;
  margin: -4px 0 0 -4px;
}

.spinner div:nth-child(1) {
  animation-delay: -0.036s;
}

.spinner div:nth-child(1):after {
  top: 63px;
  left: 63px;
}

.spinner div:nth-child(2) {
  animation-delay: -0.072s;
}

.spinner div:nth-child(2):after {
  top: 68px;
  left: 56px;
}

.spinner div:nth-child(3) {
  animation-delay: -0.108s;
}

.spinner div:nth-child(3):after {
  top: 71px;
  left: 48px;
}

.spinner div:nth-child(4) {
  animation-delay: -0.144s;
}

.spinner div:nth-child(4):after {
  top: 72px;
  left: 40px;
}

.spinner div:nth-child(5) {
  animation-delay: -0.18s;
}

.spinner div:nth-child(5):after {
  top: 71px;
  left: 32px;
}

.spinner div:nth-child(6) {
  animation-delay: -0.216s;
}

.spinner div:nth-child(6):after {
  top: 68px;
  left: 24px;
}

.spinner div:nth-child(7) {
  animation-delay: -0.252s;
}

.spinner div:nth-child(7):after {
  top: 63px;
  left: 17px;
}

.spinner div:nth-child(8) {
  animation-delay: -0.288s;
}

.spinner div:nth-child(8):after {
  top: 56px;
  left: 12px;
}

@keyframes spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===================================
   RESPONSIVE: TABLET
   =================================== */

@media (min-width: 769px) and (max-width: 1200px) {
  .insurance-online-completion {
    padding: 0;
    margin: 70px auto 50px;
  }

  .insurance-online-completion__title {
    font-size: 30px;
    padding: 0 32px;
  }

  .insurance-online-completion__subtitle {
    font-size: 17px;
    margin-bottom: 32px;
    padding: 0 32px;
  }

  .insurance-iframe-card {
    padding: 24px 0;
  }
}

/* ===================================
   RESPONSIVE: MOBILE (<768px)
   =================================== */

@media (max-width: 768px) {
  .insurance-online-completion {
    padding: 0;
    margin: 60px auto 40px;
  }

  .insurance-online-completion__title {
    font-size: 28px;
    margin-bottom: 12px;
    padding: 0 24px;
  }

  .insurance-online-completion__subtitle {
    font-size: 16px;
    margin-bottom: 28px;
    padding: 0 24px;
  }

  .insurance-iframe-card {
    padding: 20px 0;
  }

  .insurance-iframe-wrapper {
    min-height: 500px;
  }

  .insurance-iframe {
    min-height: 500px;
  }

  .loader-text {
    font-size: 15px;
  }

  .spinner {
    width: 64px;
    height: 64px;
  }

  .spinner div {
    transform-origin: 32px 32px;
  }

  .spinner div:after {
    width: 6px;
    height: 6px;
  }

  .spinner div:nth-child(1):after {
    top: 50px;
    left: 50px;
  }

  .spinner div:nth-child(2):after {
    top: 54px;
    left: 45px;
  }

  .spinner div:nth-child(3):after {
    top: 57px;
    left: 38px;
  }

  .spinner div:nth-child(4):after {
    top: 58px;
    left: 32px;
  }

  .spinner div:nth-child(5):after {
    top: 57px;
    left: 26px;
  }

  .spinner div:nth-child(6):after {
    top: 54px;
    left: 19px;
  }

  .spinner div:nth-child(7):after {
    top: 50px;
    left: 14px;
  }

  .spinner div:nth-child(8):after {
    top: 45px;
    left: 10px;
  }
}

/* ===================================
   RESPONSIVE: EXTRA SMALL (<480px)
   =================================== */

@media (max-width: 480px) {
  .insurance-online-completion {
    padding: 0;
    margin: 50px auto 32px;
  }

  .insurance-online-completion__title {
    font-size: 24px;
    padding: 0 16px;
  }

  .insurance-online-completion__subtitle {
    font-size: 15px;
    padding: 0 16px;
  }

  .insurance-iframe-card {
    padding: 16px 0;
  }

  .insurance-iframe-wrapper {
    min-height: 450px;
  }

  .insurance-iframe {
    min-height: 450px;
  }
}

/* ===================================
   ACCESSIBILITY: REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
  .insurance-iframe-loader {
    transition: none;
  }

  .spinner div {
    animation: none;
  }

  .spinner div:after {
    opacity: 0.8;
  }
}
