/* =====================================================
   WebScape — contact-modal.css
   Let's Talk popup form — glassmorphism dark aesthetic
   ===================================================== */

/* ── Overlay ────────────────────────────────────────── */
#ws-contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#ws-contact-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal card ─────────────────────────────────────── */
#ws-contact-modal {
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 760px;
  overflow: visible;
  margin: auto 0;
  position: relative;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 168, 164, 0.3) transparent;
}

#ws-contact-overlay.is-open #ws-contact-modal {
  transform: translateY(0) scale(1);
}

/* ── Modal header ───────────────────────────────────── */
.ws-modal-header {
  padding: 2.5rem 2.5rem 0;
  position: relative;
}

.ws-modal-label {
  font-family: Rubik, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1fa8a4;
  margin-bottom: 0.6rem;
}

.ws-modal-title {
  font-family: Rubik, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.ws-modal-sub {
  font-family: Roboto, sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.6;
}

/* ── Close button ───────────────────────────────────── */
.ws-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  box-sizing: border-box;
}

.ws-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Form body ──────────────────────────────────────── */
#ws-contact-form {
  padding: 2rem 2.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.4rem;
}

/* Full-width fields */
.ws-field-full {
  grid-column: 1 / -1;
}

/* ── Field groups ───────────────────────────────────── */
.ws-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ws-field-group label {
  font-family: Rubik, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.ws-field-group label .ws-required {
  color: #1fa8a4;
  margin-left: 2px;
}

/* ── Inputs, selects, textareas ─────────────────────── */
.ws-input,
.ws-select,
.ws-textarea {
  font-family: Rubik, sans-serif;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.ws-input::placeholder,
.ws-textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.ws-input:focus,
.ws-select:focus,
.ws-textarea:focus {
  border-color: #1fa8a4;
  background: rgba(31, 168, 164, 0.06);
  box-shadow: 0 0 0 3px rgba(31, 168, 164, 0.12);
}

.ws-input.ws-error,
.ws-select.ws-error,
.ws-textarea.ws-error {
  border-color: #e05555;
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.12);
}

.ws-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.ws-select option {
  background: #1a1a1a;
  color: #fff;
}

.ws-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── Error message ──────────────────────────────────── */
.ws-field-error {
  font-family: Rubik, sans-serif;
  font-size: 0.68rem;
  color: #e05555;
  margin-top: 0.2rem;
  display: none;
}

.ws-field-group.has-error .ws-field-error {
  display: block;
}

/* ── Submit row ─────────────────────────────────────── */
.ws-submit-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  gap: 1.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.ws-submit-btn {
  font-family: Rubik, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: #1fa8a4;
  border: none;
  border-radius: 3rem;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  display: flex;
  align-items: flex-start;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  gap: 0.6rem;
  white-space: nowrap;
}

.ws-submit-btn:hover:not(:disabled) {
  background: #19958f;
  transform: translateY(-1px);
}

.ws-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ws-submit-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 10, 10, 0.3);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
  display: none;
}

.ws-submit-btn.is-loading .ws-submit-spinner {
  display: block;
}

.ws-submit-btn.is-loading .ws-submit-arrow {
  display: none;
}

@keyframes ws-spin {
  to { transform: rotate(360deg); }
}

.ws-gdpr-note {
  font-family: Roboto, sans-serif;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.5;
  flex: 1;
}

.ws-gdpr-note a {
  color: rgba(31, 168, 164, 0.7);
  text-decoration: none;
}

/* ── reCAPTCHA badge area ───────────────────────────── */
.ws-recaptcha-note {
  grid-column: 1 / -1;
  font-family: Roboto, sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
}

.ws-recaptcha-note a {
  color: rgba(31, 168, 164, 0.5);
  text-decoration: none;
}

/* ── Divider ────────────────────────────────────────── */
.ws-modal-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.2rem 0;
}

/* ── Success / Error states ─────────────────────────── */
.ws-form-feedback {
  grid-column: 1 / -1;
  padding: 1.2rem 1.5rem;
  border-radius: 0.75rem;
  font-family: Rubik, sans-serif;
  font-size: 0.88rem;
  display: none;
}

.ws-form-feedback.is-success {
  background: rgba(31, 168, 164, 0.12);
  border: 1px solid rgba(31, 168, 164, 0.3);
  color: #1fa8a4;
  display: block;
}

.ws-form-feedback.is-error {
  background: rgba(224, 85, 85, 0.1);
  border: 1px solid rgba(224, 85, 85, 0.3);
  color: #e05555;
  display: block;
}

/* ── Mobile responsive ──────────────────────────────── */
@media (max-width: 620px) {
  #ws-contact-form {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .ws-modal-header {
    padding: 2rem 1.5rem 0;
  }

  .ws-field-full {
    grid-column: 1;
  }

  .ws-submit-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ws-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Scrollbar styling ──────────────────────────────── */
#ws-contact-modal::-webkit-scrollbar {
  width: 4px;
}
#ws-contact-modal::-webkit-scrollbar-thumb {
  background: rgba(31, 168, 164, 0.3);
  border-radius: 2px;
}

/* ── Scroll lock ────────────────────────────────────── */
html.ws-modal-active,
body.ws-modal-active {
  overflow: hidden !important;
  height: 100% !important;
  position: relative;
}


