/* Trial Form Modal — SDCA Phase 3a
   Design system: MoneyWorks Clean Ledger palette */

.trial-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27, 29, 33, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.trial-overlay.active { display: flex; }

.trial-modal {
  background: #F7F5F0;
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: trialSlideUp 0.25s ease-out;
}

@keyframes trialSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.trial-modal-header {
  background: #2B2D31;
  padding: 28px 32px 24px;
  text-align: center;
}
.trial-modal-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #E6EDF3;
  margin: 0 0 6px;
}
.trial-modal-header p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #8B949E;
  margin: 0;
}

.trial-modal-body {
  padding: 28px 32px 32px;
}

.trial-field {
  margin-bottom: 16px;
}
.trial-field label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #2B2D31;
  margin-bottom: 6px;
}
.trial-field input {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  border: 1px solid #D4CFC6;
  border-radius: 6px;
  background: #FFFFFF;
  color: #2B2D31;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.trial-field input:focus {
  outline: none;
  border-color: #3D9A46;
  box-shadow: 0 0 0 3px rgba(61, 154, 70, 0.12);
}
.trial-field input::placeholder { color: #8A8E96; }
.trial-field .optional-hint {
  font-size: 11px;
  color: #8A8E96;
  margin-left: 4px;
  font-weight: 400;
}

.trial-submit {
  width: 100%;
  padding: 14px 24px;
  background: #3D9A46;
  color: #000;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}
.trial-submit:hover {
  background: #4CAF50;
  box-shadow: 0 4px 20px rgba(61, 154, 70, 0.20);
}
.trial-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.trial-footer-note {
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  color: #8A8E96;
  margin-top: 12px;
}

.trial-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #8B949E;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.trial-close:hover { color: #E6EDF3; }

.trial-modal-header { position: relative; }

/* ─── Error state ─── */
.trial-field.error input {
  border-color: #D32F2F;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.10);
}
.trial-error-msg {
  font-size: 12px;
  color: #D32F2F;
  margin-top: 4px;
  display: none;
}
.trial-field.error .trial-error-msg { display: block; }

/* ─── Success state ─── */
.trial-success {
  display: none;
  text-align: center;
  padding: 32px;
}
.trial-success.active { display: block; }
.trial-success .checkmark {
  width: 56px;
  height: 56px;
  background: #3D9A46;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.trial-success .checkmark svg { width: 28px; height: 28px; }
.trial-success h3 {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  color: #2B2D31;
  margin: 0 0 8px;
}
.trial-success p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #59595C;
  margin: 0 0 20px;
}
.trial-success .download-btn {
  display: inline-block;
  padding: 12px 28px;
  background: #3D9A46;
  color: #000;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.trial-success .download-btn:hover { background: #4CAF50; }

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .trial-overlay { padding: 16px; }
  .trial-modal-header { padding: 24px 20px 20px; }
  .trial-modal-body { padding: 20px; }
  .trial-success { padding: 24px 20px; }
}
