/*
 * Shared "Send a site photo" enquiry presentation.
 *
 * Loaded by the Application Hub and Application Briefs 01–03. The form
 * itself remains in Contact Form 7 so email delivery, spam protection and
 * Fendix attribution tracking all use the existing site workflow.
 */

.site-photo-contact {
  scroll-margin-top: 5rem;
  padding: clamp(3rem, 5.5vw, 5rem) 0;
  background: var(--navy-2, var(--fx-navy, #16212b));
}

.site-photo-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(520px, 1.18fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.site-photo-copy {
  padding-top: .35rem;
}

.site-photo-contact .site-photo-copy h2 {
  max-width: 12ch;
  margin-bottom: .8rem;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.02;
}

.site-photo-intro {
  max-width: 34rem;
  margin: 0 0 1.15rem;
  color: #c9cdd1;
  font-size: .92rem;
  line-height: 1.6;
}

.site-photo-checklist {
  display: grid;
  gap: .58rem;
  margin: 1.15rem 0 1.2rem;
  padding: 0;
  list-style: none;
}

.site-photo-checklist li {
  position: relative;
  padding-left: 1.65rem;
  color: #eef0f1;
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.45;
}

.site-photo-checklist li::before {
  position: absolute;
  top: .1rem;
  left: 0;
  color: var(--red, var(--fx-red, #cc4337));
  font-size: .9rem;
  content: "✓";
}

.site-photo-note {
  max-width: 35rem;
  margin: 0 0 1rem;
  padding: .8rem .9rem;
  border-left: 3px solid var(--red, var(--fx-red, #cc4337));
  background: rgba(255, 255, 255, .055);
  color: #bfc4c8;
  font-size: .72rem;
  line-height: 1.55;
}

.site-photo-call {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: .65rem .9rem;
  border: 1px solid var(--red, var(--fx-red, #cc4337));
  border-radius: 4px;
  background: rgba(204, 67, 55, .14);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.site-photo-call:hover,
.site-photo-call:focus-visible {
  background: var(--red, var(--fx-red, #cc4337));
  color: #fff;
  transform: translateY(-1px);
}

.site-photo-form-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: #fff;
  color: #1f2933;
  box-shadow: 0 22px 56px rgba(8, 14, 20, .24);
}

.site-photo-form-shell .wpcf7 {
  margin: 0;
}

/* The form workflow already provides deliberate call actions in the page
 * header, intro panel and mobile bar. Hide the extra link injected after the
 * form so a bare phone number does not float beneath the submit controls. */
.site-photo-form-shell .call-cta.contact-form-call-cta {
  display: none !important;
}

.fendix-site-photo-form {
  padding: clamp(1.2rem, 2.2vw, 1.75rem);
}

.site-photo-form-heading {
  margin-bottom: 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid #e4e7e9;
}

.site-photo-form-heading h3 {
  display: block;
  margin: 0 0 .35rem;
  color: #1f2933;
  font-size: 1.06rem;
  line-height: 1.25;
}

.site-photo-form-heading span {
  display: block;
  color: #68717a;
  font-size: .8rem;
  line-height: 1.45;
}

.fendix-enquiry-choice {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.fendix-enquiry-choice legend {
  margin-bottom: .45rem;
  padding: 0;
  color: #29333d;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}

.fendix-enquiry-choice .wpcf7-form-control-wrap,
.fendix-enquiry-choice .wpcf7-radio {
  display: block;
  margin: 0;
}

.fendix-enquiry-choice .wpcf7-radio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.fendix-enquiry-choice .wpcf7-list-item {
  min-width: 0;
  margin: 0;
}

.fendix-enquiry-choice label {
  position: relative;
  display: block;
  height: 100%;
  cursor: pointer;
}

.fendix-enquiry-choice input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  box-shadow: none;
}

.fendix-enquiry-choice .wpcf7-list-item-label {
  display: grid;
  min-height: 46px;
  place-items: center;
  padding: .6rem .7rem;
  border: 1px solid #cfd4d8;
  border-radius: 6px;
  background: #f4f5f5;
  color: #3f4a54;
  font-size: .77rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.fendix-enquiry-choice input[type="radio"]:checked + .wpcf7-list-item-label {
  border-color: var(--red, var(--fx-red, #cc4337));
  background: #fff5f3;
  color: #8e2b24;
  box-shadow: inset 0 0 0 1px var(--red, var(--fx-red, #cc4337));
}

.fendix-enquiry-choice input[type="radio"]:focus-visible + .wpcf7-list-item-label {
  outline: 3px solid rgba(204, 67, 55, .24);
  outline-offset: 2px;
}

.site-photo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.site-photo-field {
  min-width: 0;
  margin-bottom: .78rem;
}

.site-photo-field label,
.site-photo-upload label {
  display: block;
  margin-bottom: .35rem;
  color: #29333d;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.3;
}

.site-photo-field .req,
.site-photo-upload .req {
  color: var(--red, var(--fx-red, #cc4337));
}

.site-photo-field .field-optional {
  color: #727b83;
  font-size: .74rem;
  font-weight: 600;
}

.fendix-site-photo-form input[type="text"],
.fendix-site-photo-form input[type="email"],
.fendix-site-photo-form input[type="tel"],
.fendix-site-photo-form input[type="number"],
.fendix-site-photo-form select,
.fendix-site-photo-form textarea {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: .72rem .82rem;
  border: 1px solid #cfd4d8;
  border-radius: 4px;
  outline: 0;
  background: #fff;
  color: #1f2933;
  font: inherit;
  font-size: .92rem;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.fendix-site-photo-form select {
  padding-right: 2.2rem;
}

.fendix-site-photo-form textarea {
  height: 88px;
  min-height: 88px;
  max-height: 180px;
  resize: vertical;
  line-height: 1.5;
}

.site-photo-form-grid--details {
  align-items: stretch;
  margin-bottom: .85rem;
}

.site-photo-form-grid--details > .site-photo-field,
.site-photo-form-grid--details > .site-photo-upload {
  margin-bottom: 0;
}

.fendix-site-photo-form input:focus,
.fendix-site-photo-form select:focus,
.fendix-site-photo-form textarea:focus {
  border-color: var(--red, var(--fx-red, #cc4337));
  box-shadow: 0 0 0 3px rgba(204, 67, 55, .13);
}

.site-photo-upload {
  margin-bottom: 1rem;
  padding: .82rem;
  border: 1px dashed #abb2b8;
  border-radius: 8px;
  background: #f4f5f5;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.fendix-enquiry-form[data-enquiry-mode="site"] .site-photo-upload,
.site-photo-upload.has-file {
  border-color: var(--red, var(--fx-red, #cc4337));
  background: #fff8f6;
}

.site-photo-upload:focus-within {
  border-color: var(--red, var(--fx-red, #cc4337));
  box-shadow: 0 0 0 3px rgba(204, 67, 55, .13);
}

.site-photo-upload input[type="file"] {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: .15rem 0 .3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #59636c;
  font: inherit;
  font-size: .78rem;
  box-shadow: none;
}

.site-photo-upload input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: .8rem;
  padding: .5rem .72rem;
  border: 0;
  border-radius: 4px;
  background: var(--navy, var(--fx-navy, #16212b));
  color: #fff;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}

.site-photo-upload input[type="file"]::file-selector-button:hover {
  background: var(--red, var(--fx-red, #cc4337));
}

.site-photo-upload small,
.site-photo-helper {
  display: block;
  color: #727b83;
  font-size: .72rem;
  line-height: 1.4;
}

.site-photo-file-name {
  display: block;
  margin-top: .45rem;
  color: #47535e;
  font-size: .78rem;
  font-weight: 700;
}

.site-photo-file-name:empty {
  display: none;
}

.site-photo-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  margin-top: .8rem;
  padding: .65rem;
  border: 1px solid #e0e3e5;
  border-radius: 7px;
  background: #fff;
}

.site-photo-preview[hidden] {
  display: none;
}

.site-photo-preview img {
  width: 76px;
  height: 76px;
  border-radius: 5px;
  object-fit: cover;
}

.site-photo-preview > div {
  display: grid;
  min-width: 0;
  gap: .22rem;
}

.site-photo-preview strong,
.site-photo-preview span {
  overflow: hidden;
  color: #38444e;
  font-size: .78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-photo-preview span {
  color: #727b83;
  font-weight: 500;
}

.site-photo-preview button {
  width: max-content;
  min-height: 36px;
  margin-top: .15rem;
  padding: .35rem 0;
  border: 0;
  background: transparent;
  color: #9b3028;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .2rem;
  cursor: pointer;
}

.site-photo-preview button:focus-visible {
  outline: 3px solid rgba(204, 67, 55, .24);
  outline-offset: 2px;
}

.site-photo-consent {
  margin: .25rem 0 1rem;
}

.site-photo-consent .wpcf7-list-item {
  margin: 0;
}

.site-photo-consent label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  color: #5e6870;
  font-size: .78rem;
  line-height: 1.45;
}

.site-photo-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: .08rem 0 0;
  accent-color: var(--red, var(--fx-red, #cc4337));
}

.site-photo-submit {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.fx-form-wrap .site-photo-submit {
  align-items: stretch;
  flex-direction: column;
}

.fx-form-wrap .site-photo-submit .site-photo-helper {
  text-align: center;
}

.fendix-site-photo-form input[type="submit"] {
  min-height: 46px;
  margin: 0;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 4px;
  background: var(--red, var(--fx-red, #cc4337));
  color: #fff;
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.fendix-site-photo-form input[type="submit"]:hover,
.fendix-site-photo-form input[type="submit"]:focus-visible {
  background: #a62f27;
  transform: translateY(-1px);
}

.fendix-site-photo-form input[type="submit"]:disabled {
  cursor: wait;
  opacity: .7;
  transform: none;
}

.fendix-site-photo-form .wpcf7-spinner {
  margin: 0;
}

.fendix-site-photo-form .wpcf7-not-valid-tip {
  margin-top: .35rem;
  color: #aa2e26;
  font-size: .78rem;
}

.fendix-site-photo-form .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: .8rem .9rem;
  border-width: 1px;
  border-radius: 4px;
  color: #29333d;
  font-size: .82rem;
  line-height: 1.45;
}

.fendix-form-privacy {
  margin: .15rem 0 .8rem;
  color: #66717a;
  font-size: .7rem;
  line-height: 1.45;
}

.fendix-form-privacy a {
  color: #8e2b24;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .18rem;
}

.fendix-form-privacy a:focus-visible {
  outline: 3px solid rgba(204, 67, 55, .24);
  outline-offset: 2px;
}

.fendix-site-photo-form .fendix-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.site-photo-fallback {
  padding: 2rem;
  color: #29333d;
}

.site-photo-fallback p {
  margin-top: 0;
}

@media (max-width: 980px) {
  .site-photo-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-photo-contact .site-photo-copy h2,
  .site-photo-intro,
  .site-photo-note {
    max-width: 680px;
  }
}

@media (max-width: 680px) {
  .site-photo-contact {
    padding: 3rem 0 calc(3.5rem + env(safe-area-inset-bottom));
  }

  .site-photo-contact .site-photo-copy h2 {
    max-width: 12ch;
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .site-photo-form-shell {
    border-radius: 6px;
  }

  .fendix-site-photo-form {
    padding: 1rem;
  }

  .fendix-enquiry-choice .wpcf7-radio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-photo-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
  }

  .site-photo-form-grid--details {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  .site-photo-upload {
    padding: .8rem;
  }

  .fendix-site-photo-form input[type="text"],
  .fendix-site-photo-form input[type="email"],
  .fendix-site-photo-form input[type="tel"],
  .fendix-site-photo-form input[type="number"],
  .fendix-site-photo-form input[type="file"],
  .fendix-site-photo-form select,
  .fendix-site-photo-form textarea {
    font-size: 16px;
  }

  .site-photo-submit,
  .fendix-site-photo-form input[type="submit"] {
    width: 100%;
  }

  .site-photo-submit {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .site-photo-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .fendix-enquiry-choice .wpcf7-radio {
    grid-template-columns: 1fr;
  }
}

body.fendix-form-in-view .mobile-bar,
body.fendix-form-in-view .fx-mobile-bar {
  pointer-events: none;
  opacity: 0;
  transform: translateY(110%);
}

@media (prefers-reduced-motion: reduce) {
  .fendix-site-photo-form input[type="submit"] {
    transition: none;
  }
}
