/* Public /contact — aligned with admin contact shell (no legacy theme header/footer). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --cp-shell-bg: #e8ecf8;
  --cp-shell-mid: #f1f5f9;
  --cp-ink: #0f172a;
  --cp-muted: #64748b;
  --cp-brand: #3b38eb;
  --cp-brand-soft: #6366f1;
  --cp-line: #e2e8f0;
  --cp-footer-h: 5.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.cp-contact {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--cp-ink);
  background-color: #e8ecf4;
  background-image:
    radial-gradient(ellipse 100% 70% at 8% 12%, rgba(34, 197, 94, 0.12), transparent 42%),
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(99, 102, 241, 0.2), transparent 50%),
    radial-gradient(ellipse 55% 45% at 96% 28%, rgba(59, 56, 235, 0.12), transparent 48%),
    radial-gradient(ellipse 60% 50% at 4% 88%, rgba(15, 23, 42, 0.06), transparent 45%),
    linear-gradient(165deg, #e4e9f6 0%, #f1f5f9 42%, #f8fafc 100%);
  position: relative;
}

/* Shared PM landing shell (header/footer from for-service-providers) */
.property-managers-landing.contact-landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: visible;
}

/* Header at top, form fills remaining space, footer pinned to viewport bottom */
.contact-landing app-pm-navbar {
  flex: 0 0 auto;
}

.contact-landing .cp-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* keep last form controls clear of the fixed footer */
  padding-bottom: calc(var(--cp-footer-h) + env(safe-area-inset-bottom, 0px));
}

/* Footer: always visible, pinned to the bottom of the viewport */
.contact-landing app-pm-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

.contact-landing app-pm-footer .footer,
.contact-landing app-pm-footer .footer--slim {
  margin: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 245, 249, 0.99) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -8px 28px -14px rgba(15, 23, 42, 0.2);
}

/* SAL hides [data-sal] elements at opacity:0 until scrolled into view.
   The fixed footer never scrolls into view, so force it visible. */
.contact-landing app-pm-footer [data-sal] {
  opacity: 1 !important;
  transform: none !important;
}

/* The shared `.container` caps at 1440px which is far too wide for the form.
   Constrain the form column to the same widths as the Admin contact page. */
.contact-landing .cp-form-wrap.container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

@media (min-width: 768px) {
  .contact-landing .cp-form-wrap.container {
    max-width: 680px;
    padding: 1.25rem 0 2rem;
  }
}

@media (min-width: 1100px) {
  .contact-landing .cp-form-wrap.container {
    max-width: 800px;
  }
}

/* Soft depth: bottom vignette + corner shadow (non-interactive) */
body.cp-contact::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 55% at 50% 108%, rgba(15, 23, 42, 0.09), transparent 52%),
    radial-gradient(ellipse 40% 35% at 0% 0%, rgba(15, 23, 42, 0.05), transparent 55%),
    radial-gradient(ellipse 40% 35% at 100% 0%, rgba(15, 23, 42, 0.045), transparent 55%);
}

.cp-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

.cp-shell-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.cp-main {
  flex: 1 1 auto;
  width: 100%;
  padding: 0;
}

/* Form area */
.cp-form-wrap {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 0.25rem 2.5rem;
}

@media (min-width: 576px) {
  .cp-form-wrap {
    max-width: 540px;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 768px) {
  .cp-form-wrap {
    max-width: 680px;
    padding-top: 1.25rem;
    padding-bottom: 3rem;
  }
}

@media (min-width: 1100px) {
  .cp-form-wrap {
    max-width: 800px;
  }
}

.cp-intro {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

@media (min-width: 768px) {
  .cp-intro {
    margin-bottom: 1.5rem;
    padding-top: clamp(1rem, 2vw, 1.5rem);
  }
}

.cp-title {
  margin: 0;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--cp-ink);
}

.cp-card {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.045),
    0 2px 6px rgba(15, 23, 42, 0.05),
    0 18px 40px -18px rgba(15, 23, 42, 0.16),
    0 32px 64px -28px rgba(59, 56, 235, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
}

.cp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cp-brand) 0%, var(--cp-brand-soft) 45%, #a5b4fc 100%);
  z-index: 2;
}

.cp-card-head {
  margin: 0;
  padding: calc(2rem + 4px) 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
}

@media (min-width: 576px) {
  .cp-card-head {
    padding: calc(2.25rem + 4px) 2.25rem 1.65rem;
  }
}

.cp-card-title {
  margin: 0 0 0.5rem;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: clamp(1.05rem, 1.85vw, 1.2rem);
  font-weight: 700;
  color: var(--cp-ink);
}

.cp-card-sub {
  margin: 0;
  font-size: clamp(0.8125rem, 1.25vw, 0.9375rem);
  line-height: 1.55;
  color: var(--cp-muted);
}

.cp-req {
  color: var(--cp-brand);
  font-weight: 700;
}

.cp-form {
  margin: 0;
  padding: 1.75rem 1.5rem 1.75rem;
}

@media (min-width: 576px) {
  .cp-form {
    padding: 2rem 2.25rem 2.25rem;
  }
}

.cp-field-row {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .cp-field-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.75rem;
  }
}

.cp-field {
  margin-bottom: 1.5rem;
}

.cp-field-row .cp-field {
  margin-bottom: 0;
}

.cp-label {
  display: block;
  font-weight: 600;
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
  margin-bottom: 0.5rem;
}

.cp-input,
.cp-textarea {
  width: 100%;
  border-radius: 12px;
  border: 2px solid var(--cp-line);
  font-size: clamp(0.875rem, 1.15vw, 1rem);
  padding: 0.8rem 1rem;
  color: var(--cp-ink);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cp-input:focus,
.cp-textarea:focus {
  outline: none;
  border-color: rgba(59, 56, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 56, 235, 0.12);
}

.cp-textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.cp-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cp-hint {
  font-size: clamp(0.75rem, 1.05vw, 0.8125rem);
  color: var(--cp-muted);
}

.cp-count {
  font-size: clamp(0.6875rem, 1vw, 0.8125rem);
  font-weight: 700;
  color: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
}

.cp-actions {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.cp-submit {
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: clamp(0.9375rem, 1.35vw, 1.0625rem);
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  border: none;
  border-radius: 12px;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  cursor: pointer;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, var(--cp-brand) 78%, var(--cp-brand-soft) 100%);
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.14),
    0 12px 28px -8px rgba(59, 56, 235, 0.42);
}

.cp-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cp-err {
  color: #dc2626;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.cp-status {
  margin-top: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.cp-status--ok {
  color: #15803d;
}

.cp-status--err {
  color: #dc2626;
}
