/* ═══════════════════════════════════════════════
   EasyLive Plus — Password Reset Verification
   Design System: Matching easyliveplus.com
   ═══════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --blue-primary: #046bd2;
  --blue-hover: #045cb4;
  --blue-light: #e8f1fc;
  --blue-glow: rgba(4, 107, 210, 0.15);
  --dark-slate: #1e293b;
  --body-text: #334155;
  --text-muted: #64748b;
  --bg-page: #F0F5FA;
  --bg-card: #ffffff;
  --border-light: #D1D5DB;
  --border-focus: #046BD2;
  --success: #059669;
  --success-bg: #ecfdf5;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --warning: #d97706;
  --strength-weak: #dc2626;
  --strength-fair: #d97706;
  --strength-good: #046bd2;
  --strength-strong: #059669;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 4px 24px rgba(4, 107, 210, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 40px rgba(4, 107, 210, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--body-text);
  background-color: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient Background Shapes ── */
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.bg-shape--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(4, 107, 210, 0.12) 0%, transparent 70%);
  top: -120px;
  right: -100px;
  animation: float-shape 20s ease-in-out infinite;
}

.bg-shape--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(4, 107, 210, 0.08) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: float-shape 25s ease-in-out infinite reverse;
}

.bg-shape--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(4, 107, 210, 0.06) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation: float-shape 18s ease-in-out infinite 3s;
}

@keyframes float-shape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Main Container ── */
.reset-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Brand ── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  animation: fade-slide-in 0.6s ease-out;
}

.brand__logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(4, 107, 210, 0.15));
  transition: transform var(--transition);
}

.brand__logo:hover {
  transform: scale(1.05);
}

.brand__name {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark-slate);
  letter-spacing: -0.02em;
}

.brand__name span {
  color: var(--blue-primary);
}

/* ── Reset Card ── */
.reset-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
  transition: box-shadow var(--transition);
  animation: card-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.reset-card:hover {
  box-shadow: var(--shadow-card-hover);
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Card Header ── */
.reset-card__header {
  text-align: center;
  margin-bottom: 32px;
}

.reset-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--blue-light);
  color: var(--blue-primary);
  border-radius: 14px;
  margin-bottom: 16px;
}

.reset-card__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--dark-slate);
  margin-bottom: 6px;
}

.reset-card__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Form ── */
.reset-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Form Group ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-slate);
}

/* ── Input Wrapper ── */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
  flex-shrink: 0;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--dark-slate);
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input--password {
  padding-right: 46px;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--blue-primary);
}

/* Input validation states */
.form-input.is-valid {
  border-color: var(--success);
}

.form-input.is-invalid {
  border-color: var(--error);
}

.form-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ── Toggle Password ── */
.toggle-password {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.toggle-password:hover {
  color: var(--blue-primary);
  background: var(--blue-light);
}

/* ── Password Strength Meter ── */
.strength-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}

.strength-meter.is-visible {
  opacity: 1;
}

.strength-meter__track {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.strength-meter__fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.4s ease, background-color 0.4s ease;
}

.strength-meter__label {
  font-size: 12px;
  font-weight: 500;
  min-width: 48px;
  text-align: right;
  transition: color var(--transition);
}

/* Strength levels */
.strength-meter[data-strength="weak"] .strength-meter__fill {
  width: 25%;
  background: var(--strength-weak);
}
.strength-meter[data-strength="weak"] .strength-meter__label {
  color: var(--strength-weak);
}

.strength-meter[data-strength="fair"] .strength-meter__fill {
  width: 50%;
  background: var(--strength-fair);
}
.strength-meter[data-strength="fair"] .strength-meter__label {
  color: var(--strength-fair);
}

.strength-meter[data-strength="good"] .strength-meter__fill {
  width: 75%;
  background: var(--strength-good);
}
.strength-meter[data-strength="good"] .strength-meter__label {
  color: var(--strength-good);
}

.strength-meter[data-strength="strong"] .strength-meter__fill {
  width: 100%;
  background: var(--strength-strong);
}
.strength-meter[data-strength="strong"] .strength-meter__label {
  color: var(--strength-strong);
}

/* ── Form Error ── */
.form-error {
  font-size: 13px;
  color: var(--error);
  min-height: 0;
  overflow: hidden;
  transition: min-height var(--transition), opacity var(--transition);
  opacity: 0;
}

.form-error.is-visible {
  min-height: 20px;
  opacity: 1;
}

/* ── Submit Button ── */
.btn-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: var(--blue-primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transition: background var(--transition), transform 0.15s ease, box-shadow var(--transition);
}

.btn-submit:hover:not(:disabled) {
  background: var(--blue-hover);
  box-shadow: 0 4px 16px rgba(4, 107, 210, 0.3);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.985);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-submit__loader {
  position: absolute;
  display: none;
  animation: spin 1s linear infinite;
}

.btn-submit.is-loading .btn-submit__text {
  opacity: 0;
}

.btn-submit.is-loading .btn-submit__loader {
  display: block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Feedback Messages ── */
.feedback {
  margin-top: 20px;
  padding: 0;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.feedback.is-visible {
  max-height: 120px;
  opacity: 1;
  padding: 14px 18px;
}

.feedback--success {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.feedback--error {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid rgba(220, 38, 38, 0.15);
}

/* ── Success Card (Thank You Screen) ── */
.success-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 48px 36px;
  text-align: center;
  animation: card-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  margin-bottom: 20px;
  animation: success-pop 0.5s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes success-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-card__title {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark-slate);
  margin-bottom: 10px;
}

.success-card__message {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.success-card .btn-submit {
  margin-top: 0;
}

/* ── Footer ── */
.footer-text {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-muted);
  animation: fade-slide-in 0.6s ease-out 0.4s both;
}

/* ── Animations ── */
@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered form group entrance */
.reset-form .form-group:nth-child(1) { animation: fade-slide-in 0.5s ease-out 0.3s both; }
.reset-form .form-group:nth-child(2) { animation: fade-slide-in 0.5s ease-out 0.4s both; }
.reset-form .form-group:nth-child(3) { animation: fade-slide-in 0.5s ease-out 0.5s both; }
.btn-submit { animation: fade-slide-in 0.5s ease-out 0.6s both; }

/* ── Responsive: Tablet ── */
@media (max-width: 922px) {
  .reset-container {
    padding: 32px 20px;
  }

  .reset-card {
    padding: 32px 28px;
  }
}

/* ── Responsive: Mobile ── */
@media (max-width: 544px) {
  body {
    font-size: 16px;
  }

  .brand__logo {
    width: 60px;
    height: 60px;
  }

  .brand__name {
    font-size: 20px;
  }

  .reset-container {
    padding: 24px 16px;
    justify-content: flex-start;
    padding-top: 48px;
  }

  .reset-card {
    padding: 28px 22px;
    border-radius: 10px;
  }

  .reset-card__icon {
    width: 46px;
    height: 46px;
  }

  .reset-card__title {
    font-size: 20px;
  }

  .form-input {
    height: 44px;
    font-size: 16px; /* prevents iOS zoom */
  }

  .btn-submit {
    height: 46px;
  }

  .bg-shape--1 { width: 300px; height: 300px; }
  .bg-shape--2 { width: 250px; height: 250px; }
  .bg-shape--3 { display: none; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
