/* =============================================================================
   PAGE: CONTACT
   Figma ref: node 66:3 "OURhaus - Contact (Desktop)" (1440×4217)
            mobile node 66:3418
   ============================================================================= */

/* ---- CONTACT INFO SECTION ---- */
/* Figma ref: node 66:3660 — white bg, section header + 3 cards + map */
.contact-info {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--container-padding);
}

.contact-info .section-header {
  text-align: center;
}

.contact-info__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--col-gap);
  margin-top: 60px;
  width: 100%;
}

.contact-info__cards > * {
  min-width: 0;
}

/* Contact cards */
.contact-card {
  background-color: var(--color-bg-light);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-card__heading {
  font-family: var(--font-primary);
  font-size: var(--fs-subtitle);   /* 18px */
  font-weight: var(--fw-bold);
  color: var(--color-dark-text);
  line-height: 24px;
  text-align: left;
}

.contact-card__desc {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: var(--color-dark-text);
  line-height: 20px;
  text-align: left;
}


.contact-card__value {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-dark-text);
  line-height: 20px;
  text-align: left;
  display: block;
  text-decoration: underline;
  margin-top: auto;
}

/* Phone: no underline */
a.contact-card__value[href^="tel"] {
  text-decoration: none;
}

.contact-card__phones {
  font-weight: var(--fw-regular);
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.contact-card__phones-link,
.contact-card__phones-sep {
  flex-shrink: 0;
}

.contact-card__phones-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  display: inline;
  vertical-align: baseline;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  font-weight: var(--fw-bold);
  text-decoration: none;
  cursor: pointer;
}

.contact-card__phones-link:hover,
.contact-card__phones-link:focus-visible {
  text-decoration: underline;
}

.contact-card__phones-sep {
  font-weight: var(--fw-regular);
}

/* Address: no underline */
p.contact-card__value {
  text-decoration: none;
}

/* Map — inside the contact-info section */
.contact-map {
  margin-top: 60px;
  width: 100%;
  height: 389px;
  overflow: hidden;
  background-color: #e8e5e0;
}

.contact-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-map__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- COFFEE MEETING SECTION ---- */
/* Figma ref: node 66:3661 — #f5f6f8 bg, form left + photo right */
.contact-coffee {
  background-color: var(--color-bg-light);
  padding: var(--section-padding-y) var(--container-padding);
}

.contact-coffee__content {
  display: grid;
  grid-template-columns: minmax(0, 540fr) minmax(0, 620fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  width: 100%;
}

.contact-coffee__content > * {
  min-width: 0;
}

/* ---- FORM COLUMN ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.contact-form__section-label {
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 20px;
  display: block;
}

.contact-form__heading {
  font-family: var(--font-primary);
  font-size: var(--fs-h2);          /* 60px */
  font-weight: var(--fw-light);     /* 300 */
  color: var(--color-dark-text);
  line-height: var(--lh-h2);        /* 68px */
  margin-bottom: 40px;
}

.contact-form__notice {
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 4px;
}

.contact-form__notice--success {
  background: rgba(3, 137, 26, 0.1);
  color: var(--color-dark-text);
  border: 1px solid rgba(3, 137, 26, 0.35);
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}

.contact-form__field--full {
  grid-column: span 2;
}

.contact-form__label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
  line-height: 20px;
  margin-bottom: 8px;
}

/* Input row: underline + asterisk stay aligned; error sits below */
.contact-form__control {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  border-bottom: 1px solid var(--color-dark-text);
  min-width: 0;
  width: 100%;
}

.contact-form__control:focus-within:not(.has-error) {
  border-bottom-color: var(--color-dark-text);
}

.contact-form__control.has-error,
.contact-form__control.has-error:focus-within {
  border-bottom-color: #c8102e;
}

.contact-form__required {
  flex-shrink: 0;
  align-self: flex-end;
  padding-bottom: 10px;
  color: var(--color-error);
  font-size: 14px;
  line-height: 20px;
}

.contact-form__input,
.contact-form__select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: none;
  padding: 0 16px 10px 0;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
  outline: none;
  line-height: 20px;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form__select-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.contact-form__select-wrap .contact-form__select {
  padding-right: 28px;
  cursor: pointer;
}

.contact-form__select-wrap .contact-form__phone-chevron {
  position: absolute;
  right: 0;
  bottom: 10px;
  pointer-events: none;
}

/* Country — searchable combobox (same dropdown pattern as phone code) */
.contact-form__country-selector {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.contact-form__country-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0 0 10px 0;
  margin: 0;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
  line-height: 20px;
  cursor: pointer;
  text-align: left;
}

.contact-form__country-trigger-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 12px;
}

.contact-form__country-selector.is-open .contact-form__country-chevron {
  transform: rotate(180deg);
}

.contact-form__country-dropdown {
  min-width: min(100%, 320px);
  width: max(100%, 280px);
  max-width: min(400px, calc(100vw - 40px));
}

.contact-form__country-selector.is-open .contact-form__country-dropdown {
  display: block;
}

.contact-form__input::placeholder {
  color: var(--color-dark-text);
}

.contact-form__input:focus,
.contact-form__select:focus {
  outline: none;
}

.contact-form__phone-wrap:focus-within:not(.has-error) {
  border-bottom-color: var(--color-dark-text);
}

.contact-form__textarea {
  width: 100%;
  background-color: var(--color-bg-light);
  border: 1px solid #999;
  padding: 20px;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
  outline: none;
  line-height: 20px;
  resize: none;
}

.contact-form__textarea::placeholder {
  color: #1E1E1E;
}

.contact-form__textarea:focus {
  border-color: var(--color-dark-text);
}

/* Consent checkbox */
.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 20px 0 30px;
}

.contact-form__checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-dark-text);
  -webkit-appearance: none;
  appearance: none;
}

.contact-form__checkbox:checked {
  background-color: #00a120;
  border-color: #00a120;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.contact-form__consent-text {
  font-family: var(--font-primary);
  font-size: 12px;
  line-height: 18px;
  color: var(--color-dark-text);
}

.contact-form__consent-text a {
  color: var(--color-dark-text);
  text-decoration: underline;
}

/* Validation error messages */
.contact-form__error {
  display: block;
  font-family: var(--font-primary);
  font-size: 12px;
  color: #c8102e;
  margin-top: 4px;
  line-height: 16px;
}

.contact-form__textarea.has-error {
  border-color: #c8102e;
}

.contact-form__consent.has-error .contact-form__checkbox {
  border-color: #c8102e;
}

/* Phone field — country code selector + number input */
.contact-form__phone-wrap {
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--color-dark-text);
  min-width: 0;
  width: 100%;
}

.contact-form__phone-wrap.has-error,
.contact-form__phone-wrap.has-error:focus-within {
  border-bottom-color: #c8102e;
}

.contact-form__phone-selector {
  position: relative;
  flex-shrink: 0;
}

.contact-form__phone-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-right: 1px solid #d0d0d0;
  cursor: pointer;
  padding: 0 16px 10px 0;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
  white-space: nowrap;
}

.contact-form__phone-flag {
  font-size: 14px;
  line-height: 1;
}

.contact-form__phone-code-label {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
}

.contact-form__phone-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--color-dark-text);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.contact-form__phone-selector.is-open .contact-form__phone-chevron {
  transform: rotate(180deg);
}

.contact-form__phone-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--color-white);
  border: 1px solid var(--color-grey-2);
  z-index: 200;
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-form__phone-search-wrap {
  position: sticky;
  top: 0;
  background: var(--color-white);
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  z-index: 1;
}

.contact-form__phone-search {
  width: 100%;
  border: 1px solid #d0d0d0;
  padding: 6px 10px;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--color-dark-text);
  outline: none;
  background: var(--color-white);
  box-sizing: border-box;
}

.contact-form__phone-search:focus {
  border-color: var(--color-dark-text);
}

.contact-form__phone-selector.is-open .contact-form__phone-dropdown {
  display: block;
}

.contact-form__phone-dropdown [role="option"] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--color-dark-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

/* JS sets hidden on options when filtering; display:flex above would otherwise override [hidden] */
.contact-form__phone-dropdown [role="option"][hidden] {
  display: none !important;
}

.contact-form__phone-dropdown [role="option"]:hover {
  background-color: var(--color-bg-light);
}

.contact-form__phone-dropdown [role="option"].is-selected {
  background-color: var(--color-bg-light);
  font-weight: var(--fw-semibold);
}

.contact-form__phone-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  padding: 0 0 10px 20px;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-dark-text);
  outline: none;
  line-height: 20px;
}

.contact-form__phone-input::placeholder {
  color: var(--color-muted);
}

/* ---- PHOTO COLUMN (right side) ---- */
.contact-coffee__photo-col {
  position: relative;
}

.contact-coffee__photo {
  width: 100%;
  height: 888px;
  overflow: hidden;
  position: relative;
  background-color: #2a2a2a;
}

.contact-coffee__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Quote card — overlaid on bottom of photo */
.contact-coffee__quote-card {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: var(--color-white);
  padding: 40px 20px;
  width: 322px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.contact-coffee__quote-cta {
  align-self: flex-end;
}

.contact-coffee__quote-text {
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: var(--fw-medium);
  color: var(--color-dark-text);
  line-height: 32px;
  text-align: end;
  margin-bottom: 16px;
}

.contact-coffee__quote-author {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: var(--color-lighter-black);
  line-height: 20px;
  text-align: end;
  margin-bottom: 20px;
}

/* ---- SUCCESS MODAL ---- */
.contact-success-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
}

.contact-success-modal__card {
  background-color: var(--color-white);
  width: 550px;
  max-width: calc(100% - 40px);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.contact-success-modal__heading {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: var(--fw-medium);
  color: var(--color-dark-text);
  line-height: 38px;
}

.contact-success-modal__body {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: var(--color-dark-text);
  line-height: 20px;
}

.contact-success-modal__underline {
  text-decoration: underline;
}

.contact-success-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  background-color: var(--color-dark-text);
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-top: 10px;
  transition: opacity 0.2s ease;
}

.contact-success-modal__btn:hover {
  opacity: 0.85;
}

/* ---- PHONE POPUP ---- */
.contact-phone-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 20px;
}

.contact-phone-modal[hidden] {
  display: none;
}

.contact-phone-modal__card {
  position: relative;
  background: var(--color-white);
  width: 780px;
  max-width: 100%;
  padding: 56px 40px 32px;
  text-align: center;
}

.contact-phone-modal__close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--color-dark-text);
}

.contact-phone-modal__title {
  font-family: var(--font-primary);
  font-size: 32px;
  line-height: 48px;
  font-weight: var(--fw-semibold);
  color: var(--color-dark-text);
}

.contact-phone-modal__subtitle {
  font-family: var(--font-primary);
  font-size: 20px;
  line-height: 30px;
  font-weight: var(--fw-regular);
  color: var(--color-dark-text);
}

.contact-phone-modal__phones {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contact-phone-modal__phone-item {
  border: 1px solid #dedfe4;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--color-bg-light);
}

.contact-phone-modal__phone-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.contact-phone-modal__phone-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b80ff;
  background: #DFEBFB;
  flex-shrink: 0;
}

.contact-phone-modal__phone-icon svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.contact-phone-modal__phone-label {
  font-family: var(--font-primary);
  font-size: 18px;
  line-height: 24px;
  font-weight: var(--fw-regular);
  color: var(--color-dark-text);
}

.contact-phone-modal__copy {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  border: 1px solid #d7d9df;
  background: var(--color-white);
  color: #656b78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.contact-phone-modal__copy svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.contact-phone-modal__copy:hover,
.contact-phone-modal__copy:focus-visible {
  border-color: #b9bcc5;
  color: #2d3340;
}

.contact-phone-modal__copy.is-copied {
  border-color: #2f7d32;
  color: #2f7d32;
}

.contact-phone-modal__phone-value {
  font-family: var(--font-primary);
  font-size: 22px;
  line-height: 28px;
  font-weight: var(--fw-semibold);
  color: var(--color-dark-text);
  text-align: left;
}

/* One input per row from ≤795px (768px mobile block handles smaller screens too) */
@media (max-width: 795px) {
  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
  }

  .contact-form__field--full {
    grid-column: span 1;
  }
}

/* ============================================================================
   MOBILE — max-width: 768px
   Figma ref: node 66:3418
   ============================================================================ */
@media (max-width: 768px) {

  /* Page hero — shorter on mobile (Figma: ~250px visible) */
  .page-hero {
    height: 250px;
  }

  /* Contact info */
  .contact-info {
    padding: 60px 20px;
  }

  .contact-info .section-heading {
    font-size: 36px;
    line-height: 42px;
  }

  .contact-info__cards {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 40px;
  }

  .contact-card {
    padding: 40px;
    gap: 15px;
    margin-bottom: 20px;
  }

  .contact-card__heading,
  .contact-card__desc,
  .contact-card__value {
    text-align: center;
  }

  .contact-map {
    margin-top: 40px;
    height: 389px;
  }

  /* Coffee meeting section */
  .contact-coffee {
    padding: 60px 20px;
  }

  .contact-coffee__content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form__section-label {
    text-align: center;
  }

  .contact-form__heading {
    font-size: 36px;
    line-height: 42px;
    text-align: center;
    margin-bottom: 30px;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
  }

  .contact-form__field--full {
    grid-column: span 1;
  }

  .contact-form__country-dropdown {
    width: 100%;
    max-width: none;
    min-width: 0;
    left: 0;
    right: 0;
  }

  /* Photo column — full width on mobile */
  .contact-coffee__photo-col {
    width: 100%;
  }

  .contact-coffee__photo {
    width: 100%;
    height: 600px;
  }

  .contact-coffee__quote-card {
    right: 0;
    bottom: 20px;
    left: 20px;
    width: calc(100% - 40px);
    padding: 20px;
  }

  .contact-coffee__quote-text {
    font-size: 26px;
    line-height: 32px;
    text-align: center;
  }

  .contact-coffee__quote-author {
    text-align: center;
  }

  .contact-coffee__quote-cta {
    align-self: inherit;
  }

  .contact-phone-modal {
    align-items: flex-end;
    padding: 0;
  }

  .contact-phone-modal__card {
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 56px 20px 24px;
  }

  .contact-phone-modal__title {
    font-size: 36px;
    line-height: 42px;
  }

  .contact-phone-modal__subtitle {
    font-size: 20px;
    line-height: 26px;
  }

  .contact-phone-modal__phones {
    margin-top: 28px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-phone-modal__phone-label {
    font-size: 16px;
    line-height: 22px;
  }

  .contact-phone-modal__phone-value {
    font-size: 20px;
    line-height: 26px;
  }

  .contact-phone-modal__phone-icon,
  .contact-phone-modal__copy {
    width: 30px;
    height: 30px;
  }
}

body.ourhaus-contact-success-open {
  overflow: hidden;
}
