/**
 * @file
 * DTC Theme - Estilos para páginas de autenticación.
 */

/* ==========================================================================
   Auth Page - Full Reset
   ========================================================================== */

.dtc-auth-page {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%) !important;
  padding: 1rem !important;
  margin: 0 !important;
  z-index: 9999 !important;
  overflow-y: auto !important;
}

.dtc-auth-page * {
  box-sizing: border-box;
}

.dtc-auth-container {
  width: 100%;
  max-width: 400px;
  margin: auto;
}

/* ==========================================================================
   Logo
   ========================================================================== */

.dtc-auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.dtc-auth-logo__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.dtc-auth-logo__icon svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.dtc-auth-logo__text {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.025em;
}

/* ==========================================================================
   Auth Card
   ========================================================================== */

.dtc-auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.dtc-auth-card__header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, white 100%);
  border-bottom: 1px solid #f1f5f9;
}

.dtc-auth-card__title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 0.5rem 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

.dtc-auth-card__subtitle {
  font-size: 0.9375rem !important;
  color: #64748b !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dtc-auth-card__body {
  padding: 2rem;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.dtc-auth-card__body .form-item {
  margin-bottom: 1.5rem !important;
}

.dtc-auth-card__body label {
  display: block !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: 0.5rem !important;
  padding: 0 !important;
}

.dtc-auth-card__body input[type="text"],
.dtc-auth-card__body input[type="email"],
.dtc-auth-card__body input[type="password"] {
  width: 100% !important;
  padding: 0.875rem 1rem !important;
  font-size: 1rem !important;
  font-family: inherit !important;
  color: #1e293b !important;
  background-color: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.dtc-auth-card__body input[type="text"]:focus,
.dtc-auth-card__body input[type="email"]:focus,
.dtc-auth-card__body input[type="password"]:focus {
  background-color: white !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
}

.dtc-auth-card__body input::placeholder {
  color: #94a3b8 !important;
}

/* Description/help text */
.dtc-auth-card__body .description {
  font-size: 0.8125rem !important;
  color: #64748b !important;
  margin-top: 0.5rem !important;
  line-height: 1.4 !important;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.dtc-auth-card__body .form-actions {
  margin-top: 2rem !important;
  padding: 0 !important;
}

.dtc-auth-card__body input[type="submit"],
.dtc-auth-card__body button[type="submit"] {
  width: 100% !important;
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  color: white !important;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4) !important;
}

.dtc-auth-card__body input[type="submit"]:hover,
.dtc-auth-card__body button[type="submit"]:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
}

.dtc-auth-card__body input[type="submit"]:active,
.dtc-auth-card__body button[type="submit"]:active {
  transform: translateY(0) !important;
}

/* ==========================================================================
   Links
   ========================================================================== */

.dtc-auth-card__body ul,
.dtc-auth-card__body .item-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 1.5rem 0 0 0 !important;
  text-align: center !important;
}

.dtc-auth-card__body ul li,
.dtc-auth-card__body .item-list li {
  margin: 0.5rem 0 !important;
  padding: 0 !important;
}

.dtc-auth-card__body ul a,
.dtc-auth-card__body .item-list a {
  color: #3b82f6 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.dtc-auth-card__body ul a:hover,
.dtc-auth-card__body .item-list a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

.dtc-auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.dtc-auth-links a {
  color: #3b82f6 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.dtc-auth-links a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.dtc-auth-card__body .messages {
  margin: 0 0 1.5rem 0 !important;
  padding: 1rem !important;
  border-radius: 10px !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

.dtc-auth-card__body .messages--error,
.dtc-auth-card__body .messages.error {
  background-color: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
}

.dtc-auth-card__body .messages--status,
.dtc-auth-card__body .messages.status {
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #16a34a !important;
}

.dtc-auth-card__body .messages--warning,
.dtc-auth-card__body .messages.warning {
  background-color: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #d97706 !important;
}

.dtc-auth-card__body .messages ul {
  margin: 0.5rem 0 0 0 !important;
  padding-left: 1.25rem !important;
  text-align: left !important;
}

.dtc-auth-card__body .messages ul li {
  text-align: left !important;
  margin: 0.25rem 0 !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.dtc-auth-footer {
  text-align: center;
  margin-top: 2rem;
}

.dtc-auth-footer p {
  font-size: 0.8125rem !important;
  color: rgba(255, 255, 255, 0.6) !important;
  margin: 0 !important;
}

/* ==========================================================================
   Hide Drupal default elements
   ========================================================================== */

.dtc-auth-card__body .form-item-persistent-login,
.dtc-auth-card__body .js-form-type-checkbox {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.dtc-auth-card__body input[type="checkbox"] {
  width: 1.125rem !important;
  height: 1.125rem !important;
  accent-color: #3b82f6 !important;
}

/* Ocultar tabs */
.dtc-auth-page .tabs,
.dtc-auth-page nav.tabs {
  display: none !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
  .dtc-auth-page {
    padding: 1rem !important;
  }

  .dtc-auth-card__header {
    padding: 1.5rem 1.5rem 1rem !important;
  }

  .dtc-auth-card__body {
    padding: 1.5rem !important;
  }

  .dtc-auth-card__title {
    font-size: 1.5rem !important;
  }
}
