/* ============================================================
   modal.css — "Find Your Zoho Solution" Popup
   ECOG Core Technologies — Authorized Zoho Partner
   ============================================================ */

/* ── Overlay backdrop ── */
.zs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, .6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.zs-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal box ── */
.zs-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow:
    0 32px 80px rgba(0,0,0,.28),
    0 4px 16px rgba(0,0,0,.12);
  position: relative;
  transform: scale(.88) translateY(28px);
  transition: transform .34s cubic-bezier(.34,1.56,.64,1);
  outline: none;
}

.zs-overlay.open .zs-modal {
  transform: scale(1) translateY(0);
}

/* 4-color Zoho stripe at top */
.zs-modal-stripe {
  height: 4px;
  background: linear-gradient(90deg,
    #E42527 0% 25%,
    #3DA638 25% 50%,
    #1565C0 50% 75%,
    #F6A800 75% 100%
  );
  border-radius: 20px 20px 0 0;
  flex-shrink: 0;
}

/* ── Close button ── */
.zs-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #e2e2e2;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: #7a7a7a;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  z-index: 2;
  flex-shrink: 0;
}
.zs-close:hover {
  background: #fff0f0;
  border-color: #E42527;
  color: #E42527;
  transform: rotate(90deg);
}
.zs-close:focus-visible { outline: 2px solid #E42527; outline-offset: 2px; }

/* ── Header ── */
.zs-header {
  padding: 22px 28px 4px;
}

.zs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FEF2F2;
  color: #E42527;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.zs-title {
  font-size: 20px;
  font-weight: 800;
  color: #1A1A1A;
  letter-spacing: -.3px;
  line-height: 1.25;
  margin: 0 0 8px;
}
.zs-title span { color: #E42527; }

.zs-subtitle {
  font-size: 13px;
  color: #7a7a7a;
  line-height: 1.6;
  margin: 0;
}

/* ── Form body ── */
.zs-form {
  padding: 18px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Single field wrapper */
.zs-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zs-label {
  font-size: 12px;
  font-weight: 700;
  color: #3d3d3d;
  letter-spacing: .2px;
}
.zs-label .req { color: #E42527; margin-left: 2px; }

/* Input & select shared styles */
.zs-input,
.zs-select {
  height: 48px;
  border: 1.5px solid #e2e2e2;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14px;
  color: #1A1A1A;
  background: white;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s, background .18s;
  -webkit-appearance: none;
  appearance: none;
}

/* Custom dropdown chevron */
.zs-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a7a' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.zs-select option { color: #1A1A1A; }
.zs-select option[value=""] { color: #aaa; }

.zs-input:focus,
.zs-select:focus {
  border-color: #E42527;
  box-shadow: 0 0 0 3px rgba(228,37,39,.12);
}

/* Error state */
.zs-input.has-error,
.zs-select.has-error {
  border-color: #E42527;
  background: #fff8f8;
}

/* Inline error message */
.zs-err {
  font-size: 11.5px;
  color: #E42527;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}
.zs-err.show { display: flex; }
.zs-err i { font-size: 10px; flex-shrink: 0; }

/* ── Submit button ── */
.zs-submit {
  height: 52px;
  background: #E42527;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 6px;
  width: 100%;
  font-family: inherit;
  letter-spacing: .2px;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.zs-submit:hover {
  background: #C91F20;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(228,37,39,.38);
}
.zs-submit:active { transform: translateY(0); box-shadow: none; }
.zs-submit:focus-visible { outline: 2px solid #C91F20; outline-offset: 3px; }

/* Arrow icon inside button */
.zs-submit i { font-size: 13px; transition: transform .18s; }
.zs-submit:hover i { transform: translateX(3px); }

/* ── Privacy note ── */
.zs-privacy {
  text-align: center;
  font-size: 10.5px;
  color: #b0b0b0;
  margin-top: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.zs-privacy i { font-size: 10px; color: #3DA638; }

/* ── Mobile responsive ── */
@media (max-width: 540px) {
  .zs-overlay { padding: 10px; align-items: flex-end; }

  .zs-modal {
    border-radius: 20px 20px 0 0;
    max-height: 96vh;
    transform: scale(1) translateY(60px);
  }
  .zs-overlay.open .zs-modal { transform: scale(1) translateY(0); }

  .zs-modal-stripe { border-radius: 20px 20px 0 0; }
  .zs-header       { padding: 18px 18px 4px; }
  .zs-form         { padding: 14px 18px 28px; gap: 12px; }
  .zs-title        { font-size: 17px; padding-right: 36px; }
  .zs-subtitle     { font-size: 12.5px; }
}
