/**
 * My Account Page Modernisation – Responsive Media Queries
 *
 * Override via functions-for-woo plugin.
 * Contains all my-account page responsive breakpoints.
 *
 * @package Functions-For-Woo
 */

/* ── Navigation-to-content responsive gap ── */

/* Desktop default: 24px gap */
.woocommerce-MyAccount-navigation {
  width: 18%;
}

.woocommerce-MyAccount-content {
  width: calc(82% - 24px);
  margin-left: 24px;
}

/* Mid-range: reduce gap */
@media (max-width: 1100px) {
  .woocommerce-MyAccount-navigation {
    width: 20%;
  }
  .woocommerce-MyAccount-content {
    width: calc(80% - 16px);
    margin-left: 16px;
  }
}

/* Tablet: reduce gap further */
@media (max-width: 900px) {
  .woocommerce-MyAccount-content {
    width: calc(80% - 12px);
    margin-left: 12px;
  }
}

/* Mobile: navigation stacks above, gap becomes bottom margin */
@media (max-width: 750px) {
  .woocommerce-MyAccount-navigation {
    width: 100% !important;
    border-bottom: 1px solid #ebebeb;
  }
  .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    text-align: center;
    align-items: center;
  }
  .woocommerce-MyAccount-navigation ul li {
    width: auto;
  }
  .woocommerce-MyAccount-navigation ul li a {
    display: inline-block;
    min-width: auto;
    padding: 8px 12px;
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
  .woocommerce-MyAccount-content {
    width: 100% !important;
    margin-left: 0;
    margin-top: 16px;
  }
}

/* ── reCAPTCHA scaling (larger base on desktop) ── */
@media (max-width: 768px) {
  .ffw-recaptcha-wrapper {
    transform: scale(1.0);
    margin-bottom: 0;
  }
}
@media (max-width: 500px) {
  .ffw-recaptcha-wrapper {
    transform: scale(0.85);
    margin-bottom: -15px;
  }
}
@media (max-width: 400px) {
  .ffw-recaptcha-wrapper {
    transform: scale(0.75);
    margin-bottom: -25px;
  }
}
@media (max-width: 320px) {
  .ffw-recaptcha-wrapper {
    transform: scale(0.65);
    margin-bottom: -35px;
  }
}

/* ── Mid-range: reduce gap and padding before tablet break ── */
@media (max-width: 1100px) {
  .ffw-myaccount-login-section {
    padding-left: 32px;
    padding-right: 32px;
  }
  .ffw-myaccount-login-wrap {
    gap: 32px;
  }
  .ffw-myaccount-login-card {
    padding: 65px 28px 28px;
  }
}

/* ── Tablet: reduce gap ── */
@media (max-width: 900px) {
  .ffw-myaccount-login-wrap {
    gap: 32px;
  }
  .ffw-myaccount-login-card {
    padding: 32px 24px 28px;
  }
  .ffw-myaccount-login-section {
    padding: 36px 16px;
  }
  .ffw-myaccount-register-section {
    padding: 28px 24px;
  }
  .ffw-register-form-grid {
    gap: 14px;
  }

  /* Stack reCAPTCHA above register button */
  .ffw-myaccount-register-form .ffw-recaptcha-wrapper,
  .ffw-myaccount-register-form .ffw-register-footer {
    flex: 0 0 100%;
    margin-right: 0;
  }
  .ffw-myaccount-register-form .ffw-register-footer {
    margin-top: 12px;
  }

  .woocommerce-MyAccount-content {
    padding: 30px 30px 80px;
  }
}

/* ── Mobile: stack columns vertically ── */
@media (max-width: 720px) {
  .ffw-myaccount-login-wrap {
    flex-direction: column;
    gap: 24px;
  }
  .ffw-myaccount-info-col {
    width: auto;
    flex-shrink: 0;
    padding-top: 0;
    text-align: center;
    margin: 0 auto;
  }
  .ffw-info-heading {
    font-size: 18px;
  }
  .ffw-info-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
  }
  .ffw-info-list li {
    margin-bottom: 0;
  }
  .ffw-myaccount-form-col {
    width: 100%;
    flex-shrink: 0;
  }
  .ffw-myaccount-login-card {
    padding: 28px 20px 24px;
  }
  .ffw-card-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  /* Register: stack all grid rows vertically */
  .ffw-register-form-grid {
    flex-direction: column;
    gap: 0;
  }
  .ffw-register-form-grid .ffw-form-row {
    flex: none !important;
    width: 100%;
  }

  /* Stack reCAPTCHA above register button (already applies from 900px) */
  .ffw-myaccount-register-form .ffw-recaptcha-wrapper,
  .ffw-myaccount-register-form .ffw-register-footer {
    flex: 0 0 100%;
    margin-right: 0;
  }

  /* Edit billing/shipping address: stack side-by-side fields */
  .woocommerce-address-fields .form-row-first,
  .woocommerce-address-fields .form-row-last {
    width: 100% !important;
    float: none !important;
  }

  .woocommerce-MyAccount-content {
    padding: 20px 16px 60px;
  }
}

/* ── Small phone: further reduce padding ── */
@media (max-width: 500px) {
  .woocommerce-MyAccount-content {
    padding: 14px 12px 40px;
  }
}
