/* ── Renuvia Discovery Call Modal — Sprint 10D ────────────────── */

.rdm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,16,21,.55);
  z-index: 10000;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
  pointer-events: none;
}
.rdm-overlay.rdm-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease;
  pointer-events: auto;
}

#discovery-call-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 460px;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  background: #ffffff;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22,1,.36,1);
  box-shadow: -12px 0 60px rgba(11,16,21,.22);
}
#discovery-call-modal.rdm-open {
  transform: translateX(0);
}

.rdm-inner {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

/* Header image */
.rdm-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
}
.rdm-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.rdm-img-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11,16,21,.08) 40%, rgba(11,16,21,.52) 100%);
}

/* Close */
.rdm-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .18s, transform .15s;
  box-shadow: 0 2px 12px rgba(11,16,21,.2);
  padding: 0;
}
.rdm-close-btn:hover { background: #fff; transform: scale(1.08); }
.rdm-close-btn svg {
  width: 16px; height: 16px;
  stroke: #18222d; stroke-width: 2.2;
  fill: none; stroke-linecap: round;
}

/* Content */
.rdm-content {
  padding: 26px 28px 6px;
  flex-shrink: 0;
}
.rdm-eyebrow {
  display: inline-block;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #2F817D;
  margin-bottom: 10px;
}
.rdm-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #18222D;
  margin: 0 0 13px;
}
.rdm-desc {
  font-size: .875rem;
  color: #69737E;
  line-height: 1.72;
  margin: 0 0 8px;
}
.rdm-microcopy {
  font-size: .75rem;
  color: #8d959d;
  line-height: 1.55;
  margin: 0 0 18px;
  font-style: italic;
}

/* Form */
.rdm-form {
  padding: 0 28px 28px;
}
.rdm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}
.rdm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.rdm-field label {
  font-size: .775rem;
  font-weight: 600;
  color: #33404C;
  letter-spacing: .01em;
}
.rdm-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: .9rem;
  color: #18222D;
  background: #F6F7F4;
  border: 1.5px solid #D9DDD8;
  border-radius: 10px;
  outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.rdm-field input:focus {
  border-color: #3F9E99;
  background: #EFF9F7;
  box-shadow: 0 0 0 3px rgba(63,158,153,.12);
}
.rdm-field input.rdm-err-input { border-color: #c0392b; }
.rdm-field-err {
  font-size: .71rem;
  color: #c0392b;
  min-height: 14px;
  line-height: 1.4;
}

/* Phone with dial code */
.rdm-phone-wrap {
  display: flex;
  gap: 0;
  border: 1.5px solid #D9DDD8;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
  background: #F6F7F4;
}
.rdm-phone-wrap:focus-within {
  border-color: #3F9E99;
  box-shadow: 0 0 0 3px rgba(63,158,153,.12);
  background: #EFF9F7;
}
.rdm-phone-wrap.rdm-err-input {
  border-color: #c0392b;
}
.rdm-dial-select {
  flex-shrink: 0;
  width: 94px;
  padding: 11px 6px 11px 10px;
  font-size: .85rem;
  color: #18222D;
  background: transparent;
  border: none;
  border-right: 1.5px solid #D9DDD8;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2369737E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.rdm-phone-wrap:focus-within .rdm-dial-select {
  border-right-color: transparent;
}
.rdm-phone-wrap input[type="tel"] {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: .9rem;
  color: #18222D;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.rdm-phone-wrap input[type="tel"].rdm-err-input {
  border: none;
}
[dir="rtl"] .rdm-phone-wrap { flex-direction: row-reverse; }
[dir="rtl"] .rdm-dial-select {
  border-right: none;
  border-left: 1.5px solid #D9DDD8;
  background-position: left 6px center;
  padding: 11px 10px 11px 6px;
}
[dir="rtl"] .rdm-phone-wrap:focus-within .rdm-dial-select { border-left-color: transparent; }

/* Consent */
.rdm-consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 6px;
  cursor: pointer;
}
.rdm-consent-wrap input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #3F9E99;
}
.rdm-consent-txt {
  font-size: .775rem;
  color: #33404C;
  line-height: 1.55;
  cursor: pointer;
}
.rdm-consent-wrap.rdm-consent-err .rdm-consent-txt { color: #c0392b; }
.rdm-consent-err-msg {
  font-size: .71rem;
  color: #c0392b;
  min-height: 14px;
  margin-bottom: 10px;
}

/* Submit */
.rdm-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: #18222D;
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .15s;
  font-family: inherit;
  letter-spacing: .01em;
  margin-top: 8px;
}
.rdm-submit-btn:hover:not(:disabled) {
  background: #2F817D;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(47,129,125,.22);
}
.rdm-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.rdm-submit-btn.rdm-hidden { display: none; }

/* Status */
.rdm-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: .85rem;
  line-height: 1.6;
  display: none;
}
.rdm-status.rdm-status-ok {
  display: block;
  background: #EFF9F7;
  color: #1a5c58;
  border: 1px solid rgba(63,158,153,.22);
}
.rdm-status.rdm-status-err {
  display: block;
  background: #fef4f2;
  color: #7a2a1e;
  border: 1px solid rgba(192,57,43,.18);
}
.rdm-status a { color: inherit; font-weight: 700; text-decoration: underline; }

/* Mobile */
@media (max-width: 540px) {
  #discovery-call-modal {
    width: 100%;
    top: auto;
    bottom: 0;
    height: 96dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 40px rgba(11,16,21,.22);
  }
  #discovery-call-modal.rdm-open { transform: translateY(0); }
  .rdm-img-wrap { aspect-ratio: 2.6/1; }
  .rdm-content { padding: 20px 20px 4px; }
  .rdm-form { padding: 0 20px 24px; }
  .rdm-headline { font-size: 1.3rem; }
  .rdm-row { grid-template-columns: 1fr; gap: 0; }
}

/* RTL (Hebrew) */
[dir="rtl"] #discovery-call-modal {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 12px 0 60px rgba(11,16,21,.22);
}
[dir="rtl"] #discovery-call-modal.rdm-open { transform: translateX(0); }
[dir="rtl"] .rdm-close-btn { right: auto; left: 14px; }
@media (max-width: 540px) {
  [dir="rtl"] #discovery-call-modal { transform: translateY(100%); }
  [dir="rtl"] #discovery-call-modal.rdm-open { transform: translateY(0); }
}
