/* Updated Login Page Template CSS */

/* Reset and base styles */
.t-PageBody--login {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a365d 0%, #2d5aa0 100%);
  overflow-x: hidden;
}

/* Background container */
.t-Login-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.t-Login-bgImg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a365d 0%, #2d5aa0 100%);
  position: relative;
}

/* Add subtle pattern overlay */
.t-Login-bgImg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Main container layout */
.t-Login-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Header and footer hidden */
.t-Login-containerHeader,
.t-Login-containerFooter {
  display: none;
}

/* Main content area - two column layout */
.t-Login-containerBody {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  align-items: center;
}

/* Left content area */
.t-Login-leftContent {
  color: white;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.t-Login-brand {
  flex: 1;
}

.t-Login-brandLogo {
  margin-bottom: 30px;
}

.t-Login-logo-icon {
  display: inline-block;
  width: 150px;
  /* height: 60px; */
  /* background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #2563eb 100%); */
  border-radius: 50%;
  position: relative;
}

.t-Login-logo-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
}

.t-Login-logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #fbbf24 0%, #2563eb 100%);
  border-radius: 50%;
}

.t-Login-brandTitle {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px 0;
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.t-Login-brandSubtitle {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 30px 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Features list */
.t-Login-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.t-Login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.t-Login-featureIcon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

/* Illustration */
.t-Login-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.t-Login-illustrationSvg {
  width: 300px;
  height: 200px;
  opacity: 0.8;
}

/* Right content area - login form */
.t-Login-rightContent {
  position: relative;
}

/* Login form region */
.t-Login-region {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  animation: slideInUp 0.6s ease-out;
}

/* AI badge - centered */
.t-Login-region::before {
  content: 'Potenciado con IA';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #FCB32E;
  color: #01234B;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Login header */
.t-Login-header {
  text-align: center;
  margin-bottom: 30px;
}

.t-Login-logo {
  display: inline-block;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #2563eb 100%);
  border-radius: 50%;
  margin-bottom: 20px;
  position: relative;
}

.t-Login-logo::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
}

.t-Login-logo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #fbbf24 0%, #2563eb 100%);
  border-radius: 50%;
}

.t-Login-title {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

/* Form styling */
.t-Login-body {
  margin-bottom: 30px;
  text-align: center; /* Center the logo image */
}

/* Style the logo image */
.t-Login-body img {
  display: block;
  margin: 0 auto 20px auto; /* Center horizontally and add bottom margin */
  max-width: 150px;
  height: auto;
}

.t-Form-fieldContainer {
  margin-bottom: 20px;
}

.t-Form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.t-Form-inputContainer {
  position: relative;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Fix placeholder styling */
input::placeholder {
  color: #9ca3af;
  font-size: 14px;
}

/* Hide only input field icons by targeting them more specifically */
.t-Form-inputContainer .t-Form-itemWrapper > .t-Icon,
.t-Form-inputContainer .t-Form-itemWrapper > .fa {
  display: none !important;
}

/* Alternative - hide icons that are positioned as input prefixes */
.t-Form-inputContainer .t-Form-itemWrapper .t-Form-itemPrefix .t-Icon,
.t-Form-inputContainer .t-Form-itemWrapper .t-Form-itemPrefix .fa {
  display: none !important;
}

/* Password field styling - only right padding for eye button */
input[type="password"] {
  padding-right: 45px !important;
}

/* Target the actual APEX password reveal button */
.t-Form-inputContainer .t-Form-itemWrapper {
  position: relative;
}

/* Style the APEX password reveal button - simplified approach */
.t-Form-inputContainer button[data-action="show-hide-password"],
.t-Form-inputContainer .t-Button--passwordReveal {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #374151 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  z-index: 10 !important;
}

.t-Form-inputContainer button[data-action="show-hide-password"]:hover,
.t-Form-inputContainer .t-Button--passwordReveal:hover {
  background-color: #f3f4f6 !important;
  color: #1f2937 !important;
}

/* Ensure the icon inside the password button is visible and properly styled */
.t-Form-inputContainer button[data-action="show-hide-password"] .t-Icon,
.t-Form-inputContainer .t-Button--passwordReveal .t-Icon,
.t-Form-inputContainer button[data-action="show-hide-password"] .fa,
.t-Form-inputContainer .t-Button--passwordReveal .fa {
  font-size: 14px !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  color: #374151 !important;
}

/* Override any conflicting button styles */
.t-Form-inputContainer button[data-action="show-hide-password"]::before,
.t-Form-inputContainer .t-Button--passwordReveal::before {
  display: none !important;
}

.t-Form-inputContainer button[data-action="show-hide-password"]::after,
.t-Form-inputContainer .t-Button--passwordReveal::after {
  display: none !important;
}

/* Remember me checkbox - hide duplicate and style properly */
.t-Login-rememberMe {
  display: flex;
  align-items: center;
  margin: 15px 0 20px 0;
}

.t-Login-rememberMe input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  accent-color: #fbbf24;
}

.t-Login-rememberMe label {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  cursor: pointer;
}

/* Hide any duplicate checkboxes that APEX might generate */
.t-Login-body .apex-item-checkbox:not(.t-Login-rememberMe .apex-item-checkbox) {
  display: none;
}

/* Login button */
.t-Login-buttons {
  margin-bottom: 20px;
}

.t-Button {
  padding: 14px 20px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
}


/* Registrarse Outlined Version Begin */

.t-Button-register {
            padding: 16px 32px;
            background: linear-gradient(135deg, #01234B 0%, #1e3a8a 100%);
            color: #FCB32E;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-transform: none;
            box-shadow: 
                0 4px 15px rgba(1, 35, 75, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.2);
            letter-spacing: 0.025em;
            min-width: 140px;
        }

        .t-Button-register:hover {
            transform: translateY(-2px);
            box-shadow: 
                0 8px 25px rgba(1, 35, 75, 0.4),
                0 4px 15px rgba(0, 0, 0, 0.25);
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            color: #ffd858;
        }

/* Registrarse Outlined Version End */

.t-Button:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
}

.t-Button:active {
  transform: translateY(0);
}

/* Links */
.t-Login-links {
  text-align: center;
}

.t-Login-links a {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.t-Login-links a:hover {
  color: #fbbf24;
}

/* Responsive design */
@media (max-width: 1024px) {
  .t-Login-containerBody {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 500px;
  }
  
  .t-Login-leftContent {
    order: 2;
    text-align: center;
    gap: 20px;
  }
  
  .t-Login-rightContent {
    order: 1;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .t-Login-brandTitle {
    font-size: 32px;
  }
  
  .t-Login-illustration {
    display: none;
  }
  
  .t-Login-features {
    display: none;
  }
}

@media (max-width: 768px) {
  .t-Login-container {
    padding: 15px;
    align-items: flex-start;
    padding-top: 50px;
  }
  
  .t-Login-containerBody {
    max-width: 100%;
    width: 100%;
  }
  
  .t-Login-region {
    padding: 30px 20px;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
  
  .t-Login-brandTitle {
    font-size: 28px;
  }
  
  .t-Login-leftContent {
    display: none;
  }
}

@media (max-width: 480px) {
  .t-Login-container {
    padding: 20px 15px;
    min-height: 100vh;
    align-items: center;
  }
  
  .t-Login-containerBody {
    max-width: 100%;
    width: 100%;
  }
  
  .t-Login-region {
    padding: 25px 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .t-Login-logo {
    width: 50px;
    height: 50px;
  }
  
  .t-Login-title {
    font-size: 20px;
  }
  
  /* Make logo image smaller on mobile */
  .t-Login-body img {
    max-width: 120px;
    margin-bottom: 15px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="email"] {
    padding: 12px 14px;
    font-size: 16px;
  }
  
  input[type="password"] {
    padding-right: 45px !important;
  }
  
  .t-Button {
    padding: 12px 18px;
    font-size: 16px;
  }
  
  /* Adjust spacing for mobile */
  .t-Login-body {
    margin-bottom: 20px;
  }
  
  .t-Form-fieldContainer {
    margin-bottom: 15px;
  }
  
  .t-Login-buttons {
    margin-bottom: 15px;
  }
}

/* Animation for smooth entrance */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Additional enhancements */
.t-Login-region:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Focus indicators for accessibility */
.t-Button:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

input:focus {
  outline: none;
}

/* Loading state for button */
.t-Button.is-loading {
  position: relative;
  color: transparent;
}

.t-Button.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}