/* Discount lead popup + bottom bar */
.pw-discount-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pw-discount-overlay.is-open {
  display: flex;
}

.pw-discount-modal {
  background: #fff;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  font-family: "Lato", sans-serif;
}

.pw-discount-modal__header {
  background: linear-gradient(135deg, #0b86dd 0%, #065a9e 100%);
  color: #fff;
  padding: 18px 44px 18px 20px;
}

.pw-discount-modal__header h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.pw-discount-modal__header p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.95;
}

.pw-discount-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pw-discount-modal__body {
  padding: 18px 20px 20px;
}

.pw-discount-field {
  margin-bottom: 12px;
}

.pw-discount-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.pw-discount-field input,
.pw-discount-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.pw-discount-field input:focus,
.pw-discount-field textarea:focus {
  outline: none;
  border-color: #0b86dd;
  box-shadow: 0 0 0 3px rgba(11, 134, 221, 0.15);
}

.pw-discount-field .pw-error {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 4px;
  display: none;
}

.pw-discount-field.is-invalid input,
.pw-discount-field.is-invalid textarea {
  border-color: #dc2626;
}

.pw-discount-field.is-invalid .pw-error {
  display: block;
}

.pw-discount-submit {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #0b86dd;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 16px;
  cursor: pointer;
  margin-top: 4px;
}

.pw-discount-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pw-discount-success {
  display: none;
  text-align: center;
  padding: 28px 16px;
}

.pw-discount-success.is-visible {
  display: block;
}

.pw-discount-success i {
  font-size: 2.5rem;
  color: #16a34a;
  margin-bottom: 10px;
}

.pw-discount-success h4 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #0f172a;
}

.pw-discount-success p {
  margin: 0;
  color: #475569;
}

.pw-discount-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10040;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b86dd 0%, #065a9e 100%);
  color: #fff;
  padding: 12px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  border: 0;
  width: 100%;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.pw-discount-bar.is-visible {
  display: flex;
}

.pw-discount-bar.is-confirmed {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  cursor: default;
}

body.pw-discount-bar-open {
  padding-bottom: 56px;
}

@media (max-width: 767px) {
  .pw-discount-modal {
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    align-self: flex-end;
    max-height: 88vh;
  }

  .pw-discount-overlay.is-open {
    align-items: flex-end;
    padding: 0;
  }
}

.pw-discount-notice {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #92400e;
}

.pw-discount-notice:empty {
  display: none;
}
