/* auth.css - Styles pour l'authentification DexoDev */

/* Modal Overlay */
.auth-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s ease;
}

/* Modal Container */
.auth-modal-container {
  width: 90%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Modal Header */
.auth-modal-header {
  text-align: center;
  padding: 30px 20px 20px;
  background: rgba(255, 255, 255, 0.05);
}

.auth-modal-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  animation: pulse 3s ease-in-out infinite;
  border-radius: 16px;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.auth-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.auth-modal-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Modal Body */
.auth-modal-body {
  padding: 20px 25px 25px;
}

/* Login Status */
.auth-login-status {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  min-height: 30px;
}

.auth-login-status:empty {
  display: none;
}

.auth-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fec042;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Form Groups */
.auth-form-group {
  margin-bottom: 16px;
}

.auth-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.auth-form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #fec042;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(254, 192, 66, 0.2);
}

.auth-form-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Primary Button */
.auth-btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #fec042 0%, #e6ac3b 100%);
  border: none;
  color: #344362;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 192, 66, 0.4);
}

.auth-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(254, 192, 66, 0.3);
}

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

/* Links */
.auth-modal-links {
  margin-top: 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 14px;
}

.auth-modal-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-modal-links a:hover {
  color: #fec042;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-modal-container {
    width: 95%;
    max-width: none;
    border-radius: 16px;
  }

  .auth-modal-header {
    padding: 25px 15px 15px;
  }

  .auth-modal-logo {
    width: 70px;
    height: 70px;
  }

  .auth-modal-title {
    font-size: 22px;
  }

  .auth-modal-body {
    padding: 15px 20px 20px;
  }

  .auth-form-group input {
    padding: 12px 14px;
    font-size: 15px;
  }

  .auth-btn-primary {
    padding: 14px;
    font-size: 15px;
  }

  .auth-modal-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* Touch improvements */
.auth-btn-primary,
.auth-form-group input {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Guest Mode Banner (Web only) */
.guest-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%);
  border-bottom: 2px solid #344362;
  padding: 10px 16px;
  z-index: 999;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(52, 67, 98, 0.15);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Adjust app container when guest banner is visible */
body.has-guest-banner #collection {
  padding-top: 50px;
}

body.has-guest-banner #navbar_principal {
  top: 50px;
}

/* Hide guest banner on mobile app (Cordova) */
@media screen and (max-width: 768px) {
  .guest-banner {
    padding: 8px 12px;
  }
}
