/* ClassZoo Password Reset - Shared Styles */

/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: #f5f5f5;
  color: #333333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Card Container */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.brand-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
}

/* Logo */
.logo {
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
  font-weight: normal;
  color: #333333;
}

.logo strong {
  color: inherit;
  font-weight: 700;
}

/* Tagline */
.tagline {
  text-align: center;
  font-size: 14px;
  color: #757575;
  margin-bottom: 24px;
}

/* Typography */
h1 {
  font-size: 24px;
  font-weight: 600;
  color: #333333;
  text-align: center;
  margin-bottom: 12px;
}

p {
  font-size: 14px;
  color: #666666;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 12px;
}

.body-copy {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.store-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.store-badge-link {
  display: block;
  line-height: 0;
}

.store-badge {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
}

.info-panel {
  background: #f8f7fc;
  border: 1px solid #e2ddf2;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: #555555;
}

.feature-list li + li {
  margin-top: 10px;
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-cta {
  text-decoration: none;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: #333333;
  transition:
    border-color 0.2s,
    outline 0.2s;
}

.form-group input:focus {
  outline: 2px solid #673ab7;
  outline-offset: 0;
  border-color: #673ab7;
}

.form-group input::placeholder {
  color: #999999;
}

.form-group input:disabled {
  background: #f5f5f5;
  color: #999999;
  cursor: not-allowed;
}

/* Password Wrapper with Toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #757575;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  transition: color 0.2s;
}

.toggle-pw:hover {
  color: #673ab7;
}

.toggle-pw:focus {
  outline: 2px solid #673ab7;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: #673ab7;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: #5e35b1;
}

.btn-primary:focus {
  outline: 2px solid #673ab7;
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  border-left: 4px solid;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: #ffebee;
  border-left-color: #d32f2f;
  color: #c62828;
}

.alert-success {
  background: #e8f5e9;
  border-left-color: #388e3c;
  color: #2e7d32;
}

.alert-info {
  background: #e3f2fd;
  border-left-color: #1976d2;
  color: #1565c0;
}

/* Spinner Animation */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner-primary {
  border: 3px solid rgba(103, 58, 183, 0.2);
  border-top-color: #673ab7;
}

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

/* Loading State */
.loading-container {
  text-align: center;
  padding: 20px 0;
}

.loading-container .spinner {
  margin-bottom: 12px;
}

.loading-container p {
  color: #757575;
  margin: 0;
}

/* Success Link */
.success-link {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #673ab7;
  text-decoration: none;
  border: 2px solid #673ab7;
  border-radius: 8px;
  transition:
    background-color 0.2s,
    color 0.2s;
  text-align: center;
}

.success-link:hover {
  background: #673ab7;
  color: #ffffff;
}

/* Hidden State */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .card {
    padding: 24px 16px;
  }

  .logo {
    font-size: 24px;
  }

  h1 {
    font-size: 20px;
  }

  p {
    font-size: 13px;
  }

  .store-badge {
    max-width: 200px;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}
