/* =========================================================
   AES Project Planner — Front-end Form Styles
   Designed to match aes-project-planner/plan-your-project/ exactly
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;600&display=swap');

/* ── Wrapper ──────────────────────────────────────────────── */
.aes-pp-form-wrapper {
  max-width: 940px;
  margin: 0 auto;
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  background: #f2f2f0;
  padding: 52px 60px 64px;
  box-sizing: border-box;
  color: #333;
}

@media (max-width: 767px) {
  .aes-pp-form-wrapper {
    padding: 32px 20px 40px;
  }
}

/* ── Page heading ─────────────────────────────────────────── */
.aes-pp-form-main-title {
  font-family: 'Raleway', sans-serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #222;
  margin: 0 0 18px;
  line-height: 1.2;
}

.aes-pp-form-subtitle {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.7;
  margin: 0 0 48px;
  font-weight: 400;
}

/* ── Dividers ─────────────────────────────────────────────── */
.aes-pp-divider {
  border: none;
  border-top: 1px solid #d8d8d4;
  margin: 0 0 32px;
}

/* ── Section blocks ───────────────────────────────────────── */
.aes-pp-form-section {
  margin-bottom: 0;
  padding-bottom: 32px;
}

.aes-pp-section-title {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #333;
  margin: 0 0 22px;
}

/* ── Wave-track + sliding droplet checkboxes ──────────────── */
.aes-pp-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 52px;
  margin-bottom: 36px;
}

.aes-pp-check-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

/* Hide native checkbox */
.aes-pp-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* ── Straight line track — black (unchecked) ── */
.aes-pp-toggle-track {
  position: relative;
  display: inline-block;
  width: 68px;
  height: 32px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 32'%3E%3Cline x1='0' y1='16' x2='68' y2='16' stroke='%23111111' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: background-image 0.2s;
}

/* ── Straight line track — blue (checked) ── */
.aes-pp-toggle-track.is-checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 32'%3E%3Cline x1='0' y1='16' x2='68' y2='16' stroke='%232c5f8a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── Droplet thumb — left, black (unchecked) ── */
.aes-pp-toggle-thumb {
  position: absolute;
  top: 50%;
  left: -2px;
  transform: translateY(-68%);
  width: 17px;
  height: 21px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 21'%3E%3Cpath d='M8.5 1C8.5 1 1 8 1 13.5a7.5 7.5 0 0 0 15 0C16 8 8.5 1 8.5 1Z' fill='%23111111' stroke='%23111111' stroke-width='0.3' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: left 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              background-image 0.2s;
}

/* ── Droplet thumb — right, blue (checked) ── */
.aes-pp-toggle-track.is-checked .aes-pp-toggle-thumb {
  left: 53px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 21'%3E%3Cpath d='M8.5 1C8.5 1 1 8 1 13.5a7.5 7.5 0 0 0 15 0C16 8 8.5 1 8.5 1Z' fill='%232c5f8a' stroke='%232c5f8a' stroke-width='0.3' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Focus ring */
.aes-pp-check-label input[type="checkbox"]:focus-visible ~ .aes-pp-toggle-track {
  outline: 2px solid #2c5f8a;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Label text turns blue when checked */
.aes-pp-check-label.is-checked .aes-pp-check-text {
  color: #2c5f8a;
  font-weight: 600;
}

.aes-pp-check-text {
  font-size: 0.8rem;
  color: #444;
  letter-spacing: 0.01em;
  text-align: center;
  transition: color 0.2s;
}

/* ── Radio buttons ────────────────────────────────────────── */
.aes-pp-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0 40px;
  margin-bottom: 36px;
}

.aes-pp-radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

/* Hide native radio */
.aes-pp-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom circle */
.aes-pp-radio-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #a8b8cc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.aes-pp-radio-circle::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
}

.aes-pp-radio-label input[type="radio"]:checked ~ .aes-pp-radio-circle {
  border-color: #3a6ea5;
  background: #3a6ea5;
}

.aes-pp-radio-label input[type="radio"]:checked ~ .aes-pp-radio-circle::after {
  background: #fff;
}

.aes-pp-radio-label input[type="radio"]:focus-visible ~ .aes-pp-radio-circle {
  outline: 2px solid #3a6ea5;
  outline-offset: 2px;
}

.aes-pp-radio-text {
  font-size: 0.8rem;
  color: #444;
  letter-spacing: 0.01em;
  text-align: center;
}

/* ── Personal details row ─────────────────────────────────── */
.aes-pp-row {
  display: flex;
  gap: 0;
  margin-bottom: 2px;
}

.aes-pp-col-half {
  flex: 1;
  min-width: 0;
}

.aes-pp-col-half:first-child .aes-pp-input {
  border-right: none;
}

/* ── Field wrapper ────────────────────────────────────────── */
.aes-pp-field-wrap {
  position: relative;
}

/* ── Inputs / textarea / select ───────────────────────────── */
.aes-pp-input,
.aes-pp-textarea,
.aes-pp-select {
  display: block;
  width: 100%;
  padding: 18px 20px;
  font-size: 0.75rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.aes-pp-input::placeholder,
.aes-pp-textarea::placeholder {
  color: #aaa;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.aes-pp-input:focus,
.aes-pp-textarea:focus,
.aes-pp-select:focus {
  border-color: #3a6ea5;
  color: #333;
}

.aes-pp-input.aes-pp-error,
.aes-pp-textarea.aes-pp-error,
.aes-pp-select.aes-pp-error {
  border-color: #c0392b;
}

.aes-pp-textarea {
  resize: vertical;
  min-height: 120px;
  margin-top: 2px;
  border-top: none;
}

.aes-pp-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
  cursor: pointer;
  color: #aaa;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-top: 0;
  width: 100%;
  max-width: 340px;
}

.aes-pp-select option {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.85rem;
}

/* ── Field error labels ───────────────────────────────────── */
.aes-pp-field-error {
  display: block;
  font-size: 0.75rem;
  color: #c0392b;
  margin-top: 4px;
  min-height: 1.1em;
}

/* ── Submit button ────────────────────────────────────────── */
.aes-pp-submit-wrap {
  margin-top: 16px;
}

.aes-pp-submit-btn {
  display: block;
  width: 100%;
  max-width: 340px;
  padding: 17px 20px;
  background: #2c5f8a;
  color: #fff;
  font-family: 'Raleway', 'Open Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.aes-pp-submit-btn:hover,
.aes-pp-submit-btn:focus {
  background: #1e4a6e;
  outline: none;
}

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

/* ── Response message ─────────────────────────────────────── */
.aes-pp-response-message {
  padding: 14px 18px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  border-left: 3px solid transparent;
}

.aes-pp-response-message.aes-pp-success {
  background: #eaf5ee;
  color: #1e6b35;
  border-left-color: #27ae60;
}

.aes-pp-response-message.aes-pp-error-msg {
  background: #fdf0ef;
  color: #721c24;
  border-left-color: #c0392b;
}

/* ── Step 4 layout ────────────────────────────────────────── */
.aes-pp-step4-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .aes-pp-row {
    flex-direction: column;
  }
  .aes-pp-col-half:first-child .aes-pp-input {
    border-right: 1px solid #ddd;
    border-bottom: none;
  }
  .aes-pp-checkbox-group {
    gap: 16px 36px;
  }
  .aes-pp-select,
  .aes-pp-submit-btn {
    max-width: 100%;
  }
}
