/* Variables CSS responsive para password reset */
:root {
  /* Variables dinámicas que se adaptan al viewport */
  --dynamic-padding: clamp(8px, 3vw, 24px);
  --dynamic-logo-size: clamp(100px, 15vw, 120px);
  --dynamic-title-size: clamp(18px, 5vw, 28px);
  --dynamic-subtitle-size: clamp(12px, 3.5vw, 16px);
  --dynamic-input-height: clamp(44px, 8vh, 56px);
  --dynamic-button-height: clamp(44px, 8vh, 56px);
  --dynamic-border-radius: clamp(8px, 2vw, 12px);
  --dynamic-card-radius: clamp(16px, 4vw, 24px);
}

body.reset-password, html {
  background: linear-gradient(135deg, #0067AB 0%, #0067AB 100%);
  min-height: 100vh;
  margin: 0;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Ocultar elementos específicos del header del template base */
body.reset-password #header,
body.reset-password .module h2,
body.reset-password #branding,
body.reset-password .breadcrumbs,
body.reset-password #content-main > h1,
body.reset-password #content > h1:first-child {
  display: none !important;
}

.recovery-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 910px;
  padding: 0;
}

.recovery-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: var(--dynamic-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

.recovery-done-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--dynamic-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

.recovery-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--dynamic-card-radius);
  padding: clamp(20px, 5vw, 40px) clamp(16px, 4vw, 32px);
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  transform: translateY(-30px);
}

.recovery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--dynamic-card-radius) var(--dynamic-card-radius) 0 0;
}

.logo-container {
  text-align: center;
  margin-bottom: 15px;
}

.logo-wrapper {
  display: inline-block;
  margin-bottom: 10px;
}

.logo {
  width: var(--dynamic-logo-size);
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.welcome-text .title {
  font-size: var(--dynamic-title-size);
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #66b5ea, #004ec4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-text .subtitle {
  font-size: var(--dynamic-subtitle-size);
  color: #718096;
  margin: 0;
}

.recovery-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-label {
  color: #718096;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.native-input {
  border: 2px solid #e2e8f0 !important;
  border-radius: var(--dynamic-border-radius) !important;
  padding: 16px !important;
  font-size: 16px;
  background: #ffffff;
  color: #2d3748;
  outline: none;
  transition: all 0.2s ease;
  min-height: var(--dynamic-input-height);
  box-sizing: border-box;
  width: 100%;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.native-input::placeholder {
  color: #a0aec0;
}

.native-input:focus {
  border-color: #66b5ea;
  box-shadow: 0 0 0 3px rgba(102, 181, 234, 0.1);
  transform: translateY(-1px);
}

.native-input:disabled {
  background: #f7fafc;
  cursor: not-allowed;
  opacity: 0.7;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .password-field {
  padding-right: 48px;
  width: 100%;
  flex: 1;
}

.password-wrapper .show-password-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 46px;
  background: none;
  border: none;
  border-radius: 0 11px 11px 0;
  cursor: pointer;
  color: #a0aec0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.password-wrapper .show-password-btn:hover {
  background: rgba(102, 181, 234, 0.1);
  color: #66b5ea;
}

.password-wrapper .show-password-btn:focus {
  outline: none;
  background: rgba(102, 181, 234, 0.1);
  color: #66b5ea;
}

.password-wrapper .show-password-btn:active {
  background: rgba(102, 181, 234, 0.2);
}

#eye-icon-1, #eye-icon-2 {
  filter: brightness(0) saturate(100%) invert(62%) sepia(7%) saturate(1194%) hue-rotate(177deg) brightness(94%) contrast(84%);
  transition: filter 0.2s ease;
  pointer-events: none;
}

.password-wrapper .show-password-btn:hover #eye-icon-1,
.password-wrapper .show-password-btn:hover #eye-icon-2 {
  filter: brightness(0) saturate(100%) invert(56%) sepia(78%) saturate(1364%) hue-rotate(186deg) brightness(97%) contrast(91%);
}

.error-message {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e53e3e;
  font-size: 14px;
  padding: 12px;
  background: rgba(229, 62, 62, 0.1);
  border-radius: var(--dynamic-border-radius);
  border-left: 4px solid #e53e3e;
  animation: slideIn 0.3s ease;
}

.error-message .error-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.success-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #107627;
  font-size: 14px;
  padding: 12px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: var(--dynamic-border-radius);
  border-left: 4px solid #107627;
  line-height: 1.4;
  animation: slideIn 0.3s ease;
}

.success-message .success-icon {
  font-size: 18px;
  margin-top: 1px;
  flex-shrink: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recovery-btn {
  background: linear-gradient(135deg, #0067AB 0%, #0067AB 100%);
  color: white;
  border: none;
  border-radius: var(--dynamic-border-radius);
  height: var(--dynamic-button-height);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.recovery-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.recovery-btn:active {
  transform: translateY(0);
}

.recovery-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.recovery-btn:focus {
  outline: 2px solid rgba(102, 181, 234, 0.5);
  outline-offset: 2px;
}

.recovery-links {
  text-align: center;
  margin-top: 16px;
}

.back-link {
  background: none;
  border: none;
  color: #66b5ea;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--dynamic-border-radius);
  transition: all 0.2s ease;
  text-decoration: none;
}

.back-link:hover {
  background: rgba(102, 181, 234, 0.1);
  text-decoration: underline;
}

.footer {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  line-height: 1.3;
}

.footer p {
  margin: 2px 0;
}

/* Ocultar elementos del Django admin que no necesitamos */
.breadcrumbs {
  display: none !important;
}

/* Media queries para diferentes tamaños de pantalla */

/* Pantallas medianas (tablets, teléfonos grandes) */
@media (max-width: 768px) {
  .recovery-container {
    padding: 16px;
    min-height: 100vh;
    justify-content: center;
  }

  .recovery-card {
    transform: translateY(0);
  }

  .footer {
    position: relative;
    bottom: auto;
    margin-top: 20px;
  }
}

/* Teléfonos estándar (iPhone 8, Samsung Galaxy) */
@media (max-width: 480px) {
  .recovery-container {
    padding: 12px;
    justify-content: center;
  }

  .recovery-card {
    padding: 28px 20px;
  }

  .welcome-text .title {
    font-size: 24px;
  }

  .welcome-text .subtitle {
    font-size: 15px;
  }

  .native-input {
    min-height: 52px;
    font-size: 16px;
    padding: 14px;
  }

  .recovery-btn {
    height: 52px;
    font-size: 15px;
  }

  .recovery-form {
    gap: 18px;
  }

  .input-label {
    font-size: 13px;
  }

  .back-link {
    font-size: 13px;
  }
}

/* iPhone 7, iPhone 6s (375px) */
@media (max-width: 375px) {
  .recovery-container {
    padding: 10px;
    justify-content: center;
  }

  .recovery-card {
    padding: 24px 16px;
  }

  .logo-container {
    margin-bottom: 24px;
  }

  .welcome-text .title {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .welcome-text .subtitle {
    font-size: 14px;
  }

  .native-input {
    min-height: 50px;
    padding: 12px;
  }

  .recovery-btn {
    height: 50px;
    font-size: 14px;
  }

  .recovery-form {
    gap: 16px;
  }

  .input-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .footer {
    font-size: 9px;
  }
}

/* Pantallas muy pequeñas como Nokia TA-1149 (320px) */
@media (max-width: 320px) {
  .recovery-container {
    padding: 8px;
    justify-content: center;
  }

  .recovery-card {
    padding: 20px 12px;
  }

  .logo-container {
    margin-bottom: 20px;
  }

  .welcome-text .title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .welcome-text .subtitle {
    font-size: 13px;
  }

  .native-input {
    min-height: 48px;
    padding: 10px;
  }

  .recovery-btn {
    height: 48px;
    font-size: 14px;
    margin-top: 12px;
  }

  .recovery-form {
    gap: 14px;
  }

  .input-label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .footer {
    font-size: 8px;
    line-height: 1.2;
  }
}

/* Ajustes para pantallas con poca altura (landscape) */
@media (max-height: 500px) {
  .recovery-container {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 20px;
  }

  .recovery-card {
    transform: translateY(0);
  }

  .footer {
    position: relative;
    margin-top: 15px;
  }
}

/* Estilos específicos para la página de "correo enviado" */
.info-section {
  margin-top: 24px;
  animation: fadeInUp 0.5s ease-in-out;
}

.info-card {
  background: rgba(102, 181, 234, 0.05);
  border: 1px solid rgba(102, 181, 234, 0.1);
  border-radius: var(--dynamic-border-radius);
  padding: 16px;
}

.info-card h3 {
  color: #2d3748;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
}

.info-card li {
  color: #3c424b;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.info-card li:last-child {
  margin-bottom: 0;
}

.info-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #135593;
  font-size: 14px;
  padding: 12px;
  background: rgba(49, 130, 206, 0.1);
  border-radius: var(--dynamic-border-radius);
  border-left: 4px solid #135593;
  line-height: 1.4;
  margin-top: 16px;
  animation: slideIn 0.3s ease;
}

.info-message .info-icon {
  font-size: 18px;
  margin-top: 1px;
  flex-shrink: 0;
}

.recovery-links .divider {
  color: #a0aec0;
  margin: 0 8px;
  font-weight: 300;
}

.recovery-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 20px;
}

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