/* ============================================================
   TEZ ERP — demo.css
   Styles for Request a Demo page layout, form, and social proof
   ============================================================ */

.demo-page {
  padding-block: clamp(40px, 6vw, 72px);
  background: var(--paper);
  position: relative;
}

.demo-page .container {
  max-width: 1260px;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1.28fr;
  gap: clamp(36px, 5vw, 68px);
  align-items: center;
}

/* ---------------- Left Info Column ---------------- */
.demo-info {
  display: flex;
  flex-direction: column;
}

.demo-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.16;
  color: var(--graphite);
  margin-block: 12px 16px;
  letter-spacing: -0.02em;
}

.demo-subtext {
  font-size: var(--fs-body-lg);
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Checklist of what to expect */
.demo-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.demo-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checklist-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EBF3FF;
  color: var(--azure);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.checklist-text {
  font-size: var(--fs-body-sm);
  color: var(--graphite);
  line-height: 1.45;
}

.checklist-text strong {
  color: var(--graphite);
  font-weight: 600;
}

/* Trust / Customer Proof Section (Below Checklist, inside left column) */
.demo-trust-section {
  width: 100%;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.trust-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 700;
  text-align: left;
}

.trust-logos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 20px;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.trust-logo-card {
  height: 54px;
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-logo-card img {
  max-height: 44px;
  max-width: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.2s ease;
}

.trust-logo-card:hover img {
  transform: scale(1.08);
}

/* Optical balance sizing for logos */
.trust-logo-card img[src*="Apex"] { max-height: 32px; }
.trust-logo-card img[src*="Grippo"] { max-height: 46px; max-width: 120px; }
.trust-logo-card img[src*="Esvee"] { max-height: 44px; }
.trust-logo-card img[src*="Lunkad"] { max-height: 44px; }
.trust-logo-card img[src*="BrandWagon"] { max-height: 48px; }
.trust-logo-card img[src*="Spectrum"] { max-height: 48px; }
.trust-logo-card img[src*="SportsNext"],
.trust-logo-card img[src*="sportsnext"] { max-height: 34px; }

/* Direct contact help box */
.demo-contact-box-wrap {
  display: flex;
  justify-content: flex-start;
  margin-top: 22px;
}

.demo-contact-box {
  padding: 12px 18px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--fs-caption);
  color: var(--slate);
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.demo-contact-box .contact-box-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.45;
}

.contact-box-lead {
  font-weight: 600;
  color: var(--graphite);
}

.contact-box-sub {
  color: var(--slate);
}

.contact-box-icon {
  color: var(--azure);
  flex-shrink: 0;
  margin-top: 2px;
}

.demo-contact-box a {
  color: var(--azure);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.demo-contact-box a:hover {
  color: var(--azure-dark);
}

/* ---------------- Right Form Card ---------------- */
.demo-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 24px 64px -10px rgba(15, 23, 42, 0.16), 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: clamp(24px, 3.5vw, 36px);
  position: relative;
}

.form-card-header {
  margin-bottom: 20px;
}

.form-card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--graphite);
  margin-bottom: 4px;
}

.form-card-desc {
  font-size: var(--fs-caption);
  color: var(--slate);
  line-height: 1.4;
}

.demo-form {
  display: flex;
  flex-direction: column;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 10px;
  width: 100%;
}

.form-grid .full-width,
.form-grid .form-group--full {
  grid-column: 1 / -1;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.form-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--graphite);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.required-star {
  display: none;
  color: #E11D48;
  margin-left: 2px;
  font-weight: 700;
}

.form-group.has-error .required-star {
  display: inline;
}

.optional-tag {
  font-weight: 400;
  color: var(--slate-soft);
  font-size: 0.72rem;
}

/* Side-by-Side Mobile / Email & Send OTP Button */
.phone-otp-row,
.email-otp-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.email-otp-row .form-input {
  flex: 1;
  width: 100%;
}

.phone-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
}

.phone-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-soft);
  pointer-events: none;
  user-select: none;
  padding-right: 8px;
  border-right: 1.5px solid var(--line);
  line-height: 1;
  display: flex;
  align-items: center;
  z-index: 2;
}

.phone-input-wrap .phone-field {
  width: 100%;
  padding-left: 56px;
}

.btn-side-otp {
  height: 48px;
  min-width: 120px;
  padding: 0 18px;
  background: #ffffff;
  color: var(--azure);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid rgba(47, 111, 237, 0.4);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  transition: all var(--dur-fast) var(--ease);
}

.btn-side-otp:hover {
  background: #EBF3FF;
  border-color: var(--azure);
}

.btn-side-otp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-side-verified {
  height: 48px;
  min-width: 124px;
  padding: 0 16px;
  background: #E6F7F0;
  color: #059669;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
  animation: popIn 0.25s var(--ease);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Expandable OTP Box */
.otp-box {
  margin-top: 6px;
  padding: 10px 12px;
  background: #F0F7FF;
  border: 1.5px solid #C8E1FF;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.2s var(--ease);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.otp-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.otp-box-hint {
  color: var(--slate);
  font-weight: 500;
}

.btn-resend-otp {
  background: none;
  border: none;
  color: var(--azure);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-resend-otp:hover {
  color: var(--azure-dark);
}

.otp-input-row {
  display: flex;
  width: 100%;
}

.otp-code-input {
  width: 100%;
  height: 42px;
  padding: 4px 8px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--graphite);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.otp-code-input:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.btn-verify-otp {
  height: 38px;
  padding: 0 14px;
  background: var(--azure);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}

.btn-verify-otp:hover {
  background: var(--azure-dark);
}

.otp-error-msg {
  font-size: 0.74rem;
  color: #E11D48;
  margin-top: 1px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--graphite);
  background-color: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  box-sizing: border-box;
}

.form-textarea {
  height: auto;
  min-height: 74px;
  padding: 10px 12px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 3.5px rgba(47, 111, 237, 0.14);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--slate-soft);
}

.form-input.is-invalid,
.form-select.is-invalid {
  border-color: #E11D48;
  background-color: #FFF8F8;
}

.form-input.gst-field {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.form-input.gst-field::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-weight: normal;
}

.form-error-msg {
  font-size: 0.75rem;
  color: #E11D48;
  display: none;
  margin-top: 2px;
}

.form-group.has-error .form-error-msg {
  display: block;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  padding-right: 34px;
  cursor: pointer;
}

.form-select option {
  color: var(--graphite);
  background: #ffffff;
}

.form-textarea {
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  height: auto;
  min-height: 74px;
  max-height: 180px;
  padding: 10px 12px;
  resize: none; /* No manual expansion using mouse */
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  overflow-y: hidden;
  line-height: 1.45;
}

.btn--demo-submit {
  width: 100%;
  padding: 13px 20px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  border-radius: 4px;
  margin-top: 10px;
}

.form-privacy-note {
  font-size: 0.74rem;
  color: var(--slate-soft);
  line-height: 1.4;
  text-align: center;
  margin-top: 12px;
}

/* ---------------- Success / Thank You State ---------------- */
.demo-success-state {
  display: none;
  text-align: center;
  padding: 32px 16px;
}

.demo-success-state.is-visible {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E6F7F0;
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--graphite);
  margin-bottom: 10px;
}

.success-desc {
  font-size: var(--fs-body);
  color: var(--slate);
  line-height: 1.5;
  max-width: 38ch;
  margin-bottom: 24px;
}

.success-details-box {
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 20px;
  text-align: left;
  width: 100%;
  margin-bottom: 24px;
  font-size: var(--fs-body-sm);
  color: var(--slate);
}

.success-details-box strong {
  color: var(--graphite);
}

.form-field-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin: 2px 0 6px 0;
}

/* ---------------- Responsive Breakpoints ---------------- */
@media (max-width: 960px) {
  .demo-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .demo-card {
    max-width: 600px;
    margin-inline: auto;
    width: 100%;
  }

  .trust-logos-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 24px;
  }
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .trust-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
  }

  .demo-contact-box {
    width: 100%;
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .phone-otp-row,
  .email-otp-row {
    flex-wrap: wrap;
  }

  .btn-side-otp,
  .btn-side-verified {
    width: 100%;
    justify-content: center;
  }
}
