/**
 * AUTH LAYOUT STYLES
 * Estilos para páginas de autenticación
 */

/* Background con imagen */
.auth-background {
  background: url('/img/background-1.jpg') no-repeat center center / cover;
}

/* Overlay oscuro */
.auth-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* Container principal */
.auth-main-container {
  max-width: 500px;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* Logo */
.auth-logo-img {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* Forms */
.auth-forms-wrapper {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Input customization */
.auth-form .form-control,
.auth-forms-wrapper input.form-control {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #0d0d0d;
  padding: 12px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.auth-form .form-control:focus,
.auth-forms-wrapper input.form-control:focus {
  background: #fff;
  border-color: #964e98;
  box-shadow: 0 0 0 0.25rem rgba(150, 78, 152, 0.25);
}

.auth-form .form-control::placeholder,
.auth-forms-wrapper input.form-control::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

/* Labels */
.auth-form .form-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 8px;
}

/* Títulos */
.auth-form h2,
.auth-forms-wrapper h2 {
  color: #fff;
  font-weight: 300;
}

/* Links */
.auth-form a,
.auth-forms-wrapper a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-form a:hover,
.auth-forms-wrapper a:hover {
  color: #964e98;
  text-decoration: underline;
}

/* Buttons */
.auth-form .btn-primary,
.auth-forms-wrapper .btn-light {
  transition: all 0.3s ease;
}

.auth-forms-wrapper .btn-light.rounded-pill {
  background: #f8f9fa;
  color: #0d0d0d;
  font-weight: 600;
}

.auth-forms-wrapper .btn-light.rounded-pill:hover {
  background: #e9ecef;
  color: #964e98;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-forms-wrapper .btn-light.rounded-pill:active {
  transform: translateY(0);
}

/* Alerts */
.alert {
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Password Toggle */
/* Hide native password reveal button in Edge/Chrome/Chromium browsers */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-password-reveal {
  display: none !important;
}

.password-toggle {
  position: relative;
}

.password-toggle .toggle-btn,
.btn-link {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.password-toggle .toggle-btn:hover,
.btn-link:hover i {
  color: #964e98 !important;
}

/* Form check (checkbox) */
.form-check-input:checked {
  background-color: #964e98;
  border-color: #964e98;
}

.form-check-input:focus {
  border-color: #964e98;
  box-shadow: 0 0 0 0.25rem rgba(150, 78, 152, 0.25);
}

.form-check-label {
  color: rgba(255, 255, 255, 0.9);
}

.form-check-label a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.form-check-label a:hover {
  color: #964e98;
}

/* Responsive */
@media (max-width: 575.98px) {
  .auth-main-container {
    max-width: 90%;
    padding: 1.5rem 1rem;
  }
  
  .auth-logo-img {
    max-width: 180px !important;
  }
  
  .auth-form h2,
  .auth-forms-wrapper h2 {
    font-size: 1rem;
  }
  
  .form-control-lg {
    font-size: 0.875rem;
    padding: 0.75rem;
  }
  
  .btn-lg {
    font-size: 0.875rem;
    padding: 0.75rem;
  }
  
  .auth-forms-wrapper {
    max-width: 100% !important;
  }
  
  .auth-form .form-control,
  .auth-forms-wrapper input.form-control {
    padding: 10px 12px;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .auth-main-container {
    max-width: 95%;
  }
  
  .auth-logo-img {
    max-width: 220px !important;
  }
  
  .auth-forms-wrapper {
    max-width: 340px !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .auth-main-container {
    max-width: 600px;
  }
  
  .auth-logo-img {
    max-width: 260px !important;
  }
  
  .auth-forms-wrapper {
    max-width: 380px !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .auth-main-container {
    max-width: 500px;
  }
  
  .auth-logo-img {
    max-width: 280px !important;
  }
  
  .auth-forms-wrapper {
    max-width: 360px !important;
  }
}

/* ===================================
   LANGUAGE SELECTOR
   =================================== */

/* Language dropdown positioned at top right */
.auth-overlay .dropdown {
  z-index: 1000;
}

.auth-overlay .dropdown .btn {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  transition: all 0.3s ease;
}

.auth-overlay .dropdown .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.auth-overlay .dropdown .btn:focus,
.auth-overlay .dropdown .btn:active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

.auth-overlay .dropdown-menu {
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
  margin-top: 8px;
}

.auth-overlay .dropdown-item {
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.auth-overlay .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.auth-overlay .dropdown-item:active,
.auth-overlay .dropdown-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Flag icons spacing and sizing */
.auth-overlay .dropdown-item .fi {
  font-size: 20px;
  margin-right: 10px;
  width: 1.33em;
  line-height: 1em;
  display: inline-block;
}

.auth-overlay .dropdown .btn .fi {
  font-size: 20px;
  width: 1.33em;
  line-height: 1em;
  display: inline-block;
}

/* Mobile responsive */
@media (max-width: 575.98px) {
  .auth-overlay .dropdown .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .auth-overlay .dropdown-menu {
    min-width: 150px;
  }
  
  .auth-overlay .dropdown-item {
    padding: 8px 16px;
    font-size: 13px;
  }
}
