@import "../../base/colors.css";
@import "../../base/fonts.css";

/* ── Overlay ─────────────────────────────────────────── */
.c-demo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-demo-modal[hidden] {
  display: none;
}

.c-demo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

/* ── Dialog box ──────────────────────────────────────── */
.c-demo-modal__dialog {
  position: relative;
  display: flex;
  width: min(960px, 95vw);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* ── Left panel ─────────────────────────────────────── */
.c-demo-modal__left {
  flex: 0 0 33.7%;
  background: linear-gradient(
    to bottom,
    #424ba1,
    #0062a7,
    #007197,
    #007a7d,
    #3c7f67
  );
  color: #fff;
  display: flex;
  flex-direction: column;
}

.c-demo-modal__left-inner {
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Logos */
.c-demo-modal__logos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.c-demo-modal__logo-mercer {
  height: 50px;
  width: auto;
  max-width: 220px;
}

/* Testimonial author */
.c-demo-modal__testimonial {
  display: flex;
  align-items: center;
  gap: 14px;
}

.c-demo-modal__avatar-wrap {
  flex-shrink: 0;
}

.c-demo-modal__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.c-demo-modal__avatar-placeholder {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.c-demo-modal__testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c-demo-modal__testimonial-name {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 14px;
  line-height: 20px;
  color: #fff;
}

.c-demo-modal__testimonial-role {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: #fff;
  font-family: var(--font-family);
}

/* Quote */
.c-demo-modal__quote {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: #fff;
  font-weight: 400;
  font-style: italic;
  font-family: var(--font-family);
  padding-bottom: 20px;
}

/* Divider */
.c-demo-modal__divider {
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  margin: 2px 0;
}

/* Trusted brands */
.c-demo-modal__trusted-label {
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  text-align: center;
  margin: 0;
  padding-top: 20px;
}

.c-demo-modal__brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.c-demo-modal__brand-logo {
  max-height: 40px;
  max-width: 80px;
  display: inline-block;
  vertical-align: middle;
}

/* ── Right panel ─────────────────────────────────────── */
.c-demo-modal__right {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.c-demo-modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
  z-index: 2;
}

.c-demo-modal__form-wrap {
  padding: 40px 60px 10px;
}

.c-demo-modal__title {
  font-family: var(--font-family-mmc-bold);
  font-size: 28px;
  line-height: 36px;
  color: #858c94;
  margin: 0;
  padding: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.c-demo-modal__subtitle {
  font-size: 14px;
  line-height: 18px;
  font-weight: 300;
  color: #858c94;
  margin-bottom: 35px;
}

/* ── Webform overrides inside modal ─────────────────── */
.c-demo-modal .webform-submission-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* All labels hidden — icons live on the inputs themselves */
.c-demo-modal .form-item label,
.c-demo-modal .form-item .form-item__label {
  display: none;
}

/* Checkbox label stays visible */
.c-demo-modal .form-type--checkbox label,
.c-demo-modal .form-type-checkbox label {
  display: inline;
  font-size: 14px;
  line-height: 20px;
  color: #858c94;
  font-weight: 300;
  font-family: var(--font-family);
}

/* Inputs and selects — base */
.c-demo-modal .form-item input[type="text"],
.c-demo-modal .form-item input[type="email"],
.c-demo-modal .form-item input[type="tel"],
.c-demo-modal .form-item select {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 8px 10px 8px 28px;
  font-size: 13px;
  color: #374151;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 16px 16px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  letter-spacing: 0.02em;
}

/* 
.c-demo-modal .form-item select option:first-child {
  display: none !important;
} */


.c-demo-modal .form-item input::placeholder {
  color: #858c94;
  font-size: 14px;
  line-height: 16px;
  font-weight: 300;
  opacity: 1;
}

/* Per-field icons — data URIs avoid any path/aggregation issues */
.c-demo-modal .form-item-email input[type="email"] {
  background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath fill='none' stroke='%23868D95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M4.1,4.1h21.8c1.5,0,2.7,1.2,2.7,2.7v16.4c0,1.5-1.2,2.7-2.7,2.7H4.1c-1.5,0-2.7-1.2-2.7-2.7V6.8C1.4,5.3,2.6,4.1,4.1,4.1z'/%3E%3Cpolyline fill='none' stroke='%23868D95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' points='28.6,6.8 15,16.4 1.4,6.8'/%3E%3C/svg%3E");
}
.c-demo-modal .form-item-name input[type="text"] {
  background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath fill='none' stroke='%23868D95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M27.5,29.1v-3.1c0-3.5-2.8-6.2-6.2-6.2H8.8c-3.5,0-6.2,2.8-6.2,6.2v3.1'/%3E%3Ccircle fill='none' stroke='%23868D95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' cx='15' cy='7.2' r='6.2'/%3E%3C/svg%3E");
}
.c-demo-modal .form-item-phone input[type="tel"] {
  background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.1 13.9'%3E%3Cpath fill='none' stroke='%23868D95' stroke-linecap='round' stroke-linejoin='round' d='M8.5,3.2c1.2,0.2,2.1,1.1,2.3,2.3 M8.5,0.9c2.4,0.3,4.3,2.2,4.6,4.6 M12.5,10.1c0.8,6.5-8.4,0.4-9.7-2.3C1.4,5.5-0.8,0.6,3.9,1.5c1.4,0,1.1,1.7,1.6,2.6c0.4,0.8-0.5,1.5-1,1.9c0.8,1.4,2,2.6,3.5,3.5c0.5-0.5,1.2-1.4,1.9-1C10.8,9,12.5,8.7,12.5,10.1z'/%3E%3C/svg%3E");
}
.c-demo-modal .form-item-company input[type="text"] {
  background-image: url("/themes/custom/mercer_resources/images/icons/icon-company.svg");
}

/* Dropdown — job role select: flask icon left + chevron right */
.c-demo-modal .form-item select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("/themes/custom/mercer_resources/images/icons/icon-job-role.svg"),
    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='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: left center, right 4px center;
  background-size: 16px 16px, 10px 6px;
  cursor: pointer;
  color: #374151;
  padding-right: 24px;
}

/* Flexbox rows (two columns) */
.c-demo-modal .webform-flexbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

/* Error messages */
.c-demo-modal .form-item .form-item__error-message,
.c-demo-modal .form-item .form-element--error-message,
.c-demo-modal .form-item [role="alert"] {
  color: #dc2626;
  font-size: 11px;
  margin-top: 3px;
  display: block;
  letter-spacing: 0.02em;
}

/* Checkbox — no uppercase, no ::before icon, horizontal flex */
.c-demo-modal .form-item-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.c-demo-modal .form-item-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--secondary-color);
  margin-left: 0;
}

.c-demo-modal .form-item-consent label,
.c-demo-modal .form-item-consent .form-item__label {
  text-transform: none;
  font-size: 13px;
  color: #555;
  font-weight: 400;
  letter-spacing: 0;
  gap: 0;
}

.c-demo-modal .form-item-consent label::before {
  display: none;
}

/* Submit button */
.c-demo-modal .form-actions {
  margin-top: 4px;
}

.webform-type-checkbox {
  margin-bottom: 20px;
}

.c-demo-modal .form-actions .button,
.c-demo-modal .form-actions input[type="submit"],
.c-demo-modal .form-actions button[type="submit"] {
  width: 100%;
  background-color: #00ac41;
  border: 1px solid #00ac41;
  color: #fff;
  border: none;
  padding: 16px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

/* ── Inline success text (appended below form after submission) ── */
.c-demo-modal__success-text {
  color: #00ac41;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  margin: 8px 0 0;
}

/* Privacy note */
.c-demo-modal__privacy {
  margin-top: 14px;
  font-size: 12px;
  line-height: 16px;
  color: #868d95;
  font-family: var(--font-family);
}

.c-demo-modal__privacy a {
  color: #888;
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .c-demo-modal__dialog {
    flex-direction: column;
    max-height: 95vh;
    width: 95vw;
  }

  .c-demo-modal__left {
    flex: 0 0 auto;
  }

  .c-demo-modal__left-inner {
    padding: 24px 20px;
    gap: 14px;
  }

  .c-demo-modal__quote {
    display: none;
  }

  .c-demo-modal__form-wrap {
    padding: 28px 20px 24px;
  }

  .c-demo-modal .webform-flexbox {
    grid-template-columns: 1fr;
  }
}
