/* Extracted from product-detail.css */

.figma-enquiry {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.figma-enquiry-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: #fff;
  padding: 53px 76px 49px;
  box-shadow: 0 18px 65px rgba(0, 0, 0, 0.26);
  z-index: 2;
  margin: auto;
  box-sizing: border-box;
}

/* Inline Mode (e.g. for Contact Page) */
.figma-enquiry.figma-enquiry-inline {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  display: block !important;
  overflow: visible !important;
  padding: 0 !important;
}

.figma-enquiry.figma-enquiry-inline .figma-enquiry-card {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: transparent !important;
  margin: 0 !important;
}

.figma-enquiry-card::-webkit-scrollbar {
  width: 5px;
}

.figma-enquiry-card::-webkit-scrollbar-track {
  background: transparent;
}

.figma-enquiry-card::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 3px;
}

.figma-enquiry-card::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.figma-enquiry-close {
  position: absolute;
  right: 20px;
  top: 16px;
  border: 0;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #111;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 150ms ease;
}

.figma-enquiry-close:hover {
  background-color: #f2f2f2;
}

.figma-enquiry h2 {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  color: #111;
}

.figma-enquiry-lead {
  margin: 14px 0 36px;
  color: rgba(0, 0, 0, 0.58);
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 12px;
  line-height: 1.45;
}

.figma-enquiry-form {
  width: 100%;
}

.figma-enquiry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 17px;
}

.figma-enquiry-field {
  position: relative;
}

.figma-enquiry-field.full {
  grid-column: 1 / -1;
}

.figma-enquiry-field label {
  position: absolute;
  z-index: 1;
  left: 17px;
  top: 15px;
  color: #545454;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.figma-enquiry-field input,
.figma-enquiry-field textarea {
  width: 100%;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  color: #111;
  outline: 0;
  box-sizing: border-box;
}

.figma-enquiry-field input {
  height: 47px;
}

.figma-enquiry-field input.read-only-product {
  background: #fbfbfb;
  font-weight: 500;
  color: #111;
}

.figma-enquiry-field textarea {
  min-height: 100px;
  padding: 14px 16px;
  resize: vertical;
}

.figma-enquiry-field textarea::placeholder {
  color: rgba(84, 84, 84, 0.45);
}

.figma-enquiry-field.filled label,
.figma-enquiry-field:focus-within label,
.figma-enquiry-field:has(input:-webkit-autofill) label {
  opacity: 0 !important;
}

.figma-enquiry-field input:focus,
.figma-enquiry-field textarea:focus {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.figma-enquiry-field.phone-field-wrap,
.figma-enquiry .phone-field-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.figma-enquiry-field.phone-field-wrap .field-error,
.figma-enquiry .phone-field-wrap .field-error {
  width: 100%;
  flex-basis: 100%;
}

.figma-enquiry-field.phone-field-wrap label,
.figma-enquiry .phone-field-wrap label {
  left: 78px;
}

.figma-enquiry-field.phone-field-wrap input,
.figma-enquiry .phone-field-wrap input {
  border-left: 1px solid #111;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}

.figma-enquiry .phone-field-wrap.filled label,
.figma-enquiry .phone-field-wrap:focus-within label,
.figma-enquiry .phone-field-wrap:has(input:-webkit-autofill) label {
  opacity: 0 !important;
}

/* Custom Dropdown Select inside Figma Enquiry */
.figma-enquiry .download-select-wrap {
  position: relative;
  width: 100%;
}

.figma-enquiry .download-select-trigger {
  width: 100%;
  height: 47px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: 0;
  box-sizing: border-box;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.figma-enquiry .download-select-trigger:focus,
.figma-enquiry .download-select-trigger.is-open {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.figma-enquiry .download-select-label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.figma-enquiry .download-select-label.is-placeholder {
  color: #545454;
  font-size: 12px;
}

.figma-enquiry .download-select-arrow {
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 180ms ease;
}

.figma-enquiry .download-select-arrow.is-open {
  transform: rotate(180deg);
}

.figma-enquiry .download-select-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.figma-enquiry .download-select-option {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  color: #111111;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 120ms ease, color 120ms ease;
}

.figma-enquiry .download-select-option:last-child {
  border-bottom: 0;
}

.figma-enquiry .download-select-option:hover {
  background-color: #f7f7f7;
}

.figma-enquiry .download-select-option.is-selected {
  background-color: #f0f0f0;
  font-weight: 500;
}

/* Phone Country Selector inside Figma Enquiry */
.figma-enquiry .phone-country-select-container {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
}

.figma-enquiry .phone-country-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #111;
  border-right: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 150ms ease;
  box-sizing: border-box;
}

.figma-enquiry .phone-country-trigger:hover {
  background: #fbfbfb;
}

.figma-enquiry .country-flag-img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: block;
}

.figma-enquiry .country-chevron-icon {
  transition: transform 180ms ease;
  display: block;
}

.figma-enquiry .country-chevron-icon.is-open {
  transform: rotate(180deg);
}

.figma-enquiry .phone-country-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  width: 270px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.figma-enquiry .phone-country-search-wrap {
  padding: 8px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.figma-enquiry .phone-country-search-input {
  width: 100% !important;
  height: 34px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-family: 'Poppins', sans-serif !important;
  border: 1px solid #ddd !important;
  border-radius: 3px !important;
  outline: none !important;
  background: #fff !important;
}

.figma-enquiry .phone-country-search-input:focus {
  border-color: #999 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
}

.figma-enquiry .phone-country-list {
  max-height: 200px;
  overflow-y: auto;
}

.figma-enquiry .phone-country-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: #888;
  font-family: 'Poppins', sans-serif;
}

.figma-enquiry .phone-country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #333;
  transition: background-color 120ms ease;
}

.figma-enquiry .phone-country-option:last-child {
  border-bottom: 0;
}

.figma-enquiry .phone-country-option:hover {
  background: #f5f5f5;
  color: #111;
}

.figma-enquiry .phone-country-option.is-selected {
  background: #f0f4f8;
  font-weight: 600;
  color: #111;
}

.figma-enquiry .country-flag-img-option {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.figma-enquiry .country-name-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.figma-enquiry .country-dial-code {
  font-size: 12px;
  color: #777;
  flex-shrink: 0;
}

/* Real Google reCAPTCHA inside Inquiry Modal */
.figma-captcha-wrapper {
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.figma-captcha-wrapper .google-recaptcha-wrapper {
  display: flex;
  justify-content: flex-start;
  min-height: 78px;
}

.figma-captcha-error {
  color: #e53e3e;
  font-size: 12px;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  line-height: 1.4;
}

.figma-enquiry-submit {
  display: block;
  width: 225px;
  height: 38px;
  margin: 25px auto 0;
  border: 0;
  border-radius: 2px;
  background: #e5a95d;
  color: #111;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 140ms ease, background-color 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 2px 8px rgba(229, 169, 93, 0.3);
}

.figma-enquiry-submit:hover {
  background: #df9e4d;
  box-shadow: 0 4px 12px rgba(229, 169, 93, 0.4);
}

.figma-enquiry-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.figma-enquiry-consent {
  text-align: center;
  color: #888;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  margin-top: 18px;
}

.figma-enquiry-consent em {
  color: #111;
  font-weight: 600;
  font-style: normal;
}

/* Thank You Card for Enquiry Modal */
.figma-enquiry-card-thankyou {
  width: min(760px, 100%) !important;
  min-height: min(520px, calc(100vh - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
  padding: 53px 76px 49px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
  box-sizing: border-box !important;
}

.figma-enquiry-thankyou-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto 0;
}

.figma-enquiry-thankyou-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #f3b469;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 4px 18px rgba(243, 180, 105, 0.4);
}

.figma-enquiry-thankyou-icon svg {
  width: 26px;
  height: 26px;
  stroke: #111111;
  stroke-width: 2.8;
}

.figma-enquiry-thankyou-title {
  margin: 0 0 16px !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  font-size: 32px !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  color: #111111 !important;
  text-align: center !important;
}

.figma-enquiry-thankyou-desc {
  margin: 0 auto 38px !important;
  max-width: 420px;
  font-family: 'Inter', sans-serif !important;
  font-weight: 400 !important;
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  color: #555555 !important;
  text-align: center !important;
}

.figma-enquiry-thankyou-btn {
  width: 200px;
  height: 46px;
  border: 0;
  border-radius: 2px;
  background: #f3b469;
  color: #111111;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease, transform 140ms ease, box-shadow 180ms ease;
  box-shadow: 0 3px 12px rgba(243, 180, 105, 0.4);
}

.figma-enquiry-thankyou-btn:hover {
  background: #e5a454;
  box-shadow: 0 5px 16px rgba(243, 180, 105, 0.5);
  transform: translateY(-1px);
}

.figma-enquiry-thankyou-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .figma-enquiry {
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 16px));
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .figma-enquiry-card {
    padding: 38px 30px 32px;
    margin: 0 auto;
    max-height: none;
    overflow: visible;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.28);
  }

  .figma-enquiry-card-thankyou {
    padding: 38px 30px 32px !important;
    min-height: auto !important;
  }
}

/* Mobile Devices (max-width: 600px) */
@media (max-width: 600px) {
  .figma-enquiry {
    padding: 14px 10px calc(36px + env(safe-area-inset-bottom, 20px));
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .figma-enquiry-card {
    padding: 26px 16px 22px;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
  }

  .figma-enquiry-close {
    right: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border-radius: 50%;
    background: #f4f4f4;
    color: #111;
    z-index: 10;
    transition: background-color 150ms ease, transform 120ms ease;
  }

  .figma-enquiry-close:hover {
    background-color: #ebebeb;
  }

  .figma-enquiry-close:active {
    transform: scale(0.92);
  }

  .figma-enquiry h2 {
    font-size: 20px;
    line-height: 1.25;
    padding-right: 42px; /* Prevent overlap with close button */
    word-break: break-word;
  }

  .figma-enquiry-lead {
    margin: 8px 0 18px;
    font-size: 12.5px;
    line-height: 1.45;
  }

  /* Single Column Form Layout on Mobile */
  .figma-enquiry-grid {
    display: flex;
    flex-direction: column;
    gap: 13px;
    width: 100%;
  }

  .figma-enquiry-field {
    width: 100%;
    box-sizing: border-box;
  }

  .figma-enquiry-field.full {
    grid-column: auto;
    width: 100%;
  }

  .figma-enquiry-field input,
  .figma-enquiry-field textarea,
  .figma-enquiry .download-select-trigger {
    width: 100%;
    font-size: 16px; /* 16px prevents iOS Safari auto-zoom on focus */
    height: 48px;
    padding: 10px 14px;
    border-radius: 0;
    box-sizing: border-box;
  }

  .figma-enquiry-field textarea {
    min-height: 90px;
    height: auto;
    padding: 12px 14px;
    resize: vertical;
  }

  .figma-enquiry-field label {
    font-size: 12px;
    top: 15px;
    left: 14px;
  }

  .figma-enquiry-field.phone-field-wrap label,
  .figma-enquiry .phone-field-wrap label {
    left: 78px;
  }

  .figma-enquiry .phone-country-trigger {
    height: 48px;
    padding: 0 10px;
    flex-shrink: 0;
  }

  .figma-enquiry .phone-country-dropdown {
    width: min(290px, calc(100vw - 36px));
    max-width: calc(100vw - 36px);
  }

  .figma-enquiry .phone-country-search-input {
    font-size: 16px !important; /* Prevents iOS Safari auto-zoom */
    height: 38px !important;
  }

  .figma-enquiry .download-select-menu {
    max-height: 200px;
  }

  .figma-enquiry .download-select-option {
    padding: 12px 14px;
    font-size: 14px;
  }

  /* Centered and scaled reCAPTCHA without horizontal overflow */
  .figma-captcha-wrapper {
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
    overflow: hidden;
  }

  .figma-captcha-wrapper .google-recaptcha-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 270px;
    height: 70px;
    min-height: 70px;
    overflow: hidden;
  }

  .figma-captcha-wrapper .google-recaptcha-wrapper > div {
    transform: scale(0.88);
    transform-origin: center center;
  }

  .figma-enquiry-submit {
    width: 100%;
    max-width: 260px;
    height: 46px;
    margin: 20px auto 0;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  .figma-enquiry-consent {
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.45;
    padding: 0 6px;
  }

  /* Thank You State on Mobile */
  .figma-enquiry-card-thankyou {
    padding: 34px 16px 26px !important;
    min-height: auto !important;
  }

  .figma-enquiry-thankyou-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
  }

  .figma-enquiry-thankyou-icon svg {
    width: 22px;
    height: 22px;
  }

  .figma-enquiry-thankyou-title {
    font-size: 22px !important;
    margin-bottom: 12px !important;
  }

  .figma-enquiry-thankyou-desc {
    font-size: 13px !important;
    margin-bottom: 22px !important;
    line-height: 1.5 !important;
  }

  .figma-enquiry-thankyou-btn {
    width: 100%;
    max-width: 200px;
    height: 44px;
  }
}

/* Small Mobile Devices (e.g., iPhone SE, Galaxy S <= 380px) */
@media (max-width: 380px) {
  .figma-enquiry {
    padding: 10px 6px calc(24px + env(safe-area-inset-bottom, 16px));
  }

  .figma-enquiry-card {
    padding: 22px 12px 18px;
    border-radius: 6px;
  }

  .figma-enquiry h2 {
    font-size: 18px;
    padding-right: 36px;
  }

  .figma-enquiry-lead {
    font-size: 11.5px;
    margin-bottom: 15px;
  }

  .figma-enquiry-grid {
    gap: 11px;
  }

  .figma-captcha-wrapper .google-recaptcha-wrapper {
    width: 240px;
    height: 62px;
    min-height: 62px;
  }

  .figma-captcha-wrapper .google-recaptcha-wrapper > div {
    transform: scale(0.78);
    transform-origin: center center;
  }

  .figma-enquiry .phone-country-dropdown {
    width: calc(100vw - 24px);
  }

  .figma-enquiry-submit {
    height: 44px;
    font-size: 13px;
  }
}

/* Extremely Small Screens (<= 330px) */
@media (max-width: 330px) {
  .figma-captcha-wrapper .google-recaptcha-wrapper {
    width: 220px;
    height: 58px;
    min-height: 58px;
  }

  .figma-captcha-wrapper .google-recaptcha-wrapper > div {
    transform: scale(0.72);
    transform-origin: center center;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

