/**
 * Custom Icon Positioning CSS for Form Inputs
 * Designed for 2025 modern interfaces using Phosphor Icons
 */

/* Input Icon Positioning - Ensures proper vertical alignment */
.input-with-icon .input-icon,
.password-field .input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 1rem;
  color: var(--text-tertiary, #6c757d);
  z-index: 5;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Password toggle button styling */
.password-toggle {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-tertiary, #6c757d);
  cursor: pointer;
  z-index: 5;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
  color: var(--primary, #0d6efd);
}

/* Input with icons - ensure proper padding */
.input-with-icon .form-control {
  padding-left: 3rem;
}

.password-field .form-control {
  padding-left: 3rem;
  padding-right: 3rem;
}

/* Phosphor Duotone styling - custom colors */
.ph-duotone {
  --ph-primary-color: var(--primary, #0d6efd);
  --ph-secondary-color: var(--gray-600, #6c757d);
  --ph-secondary-opacity: 0.4;
}

/* Custom focus effects for inputs with icons */
.input-with-icon:focus-within .input-icon,
.password-field:focus-within .input-icon {
  color: var(--primary, #0d6efd);
}

/* 3D effect for icons on hover */
.auth-feature-icon i {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.auth-feature-item:hover .auth-feature-icon i {
  transform: translateY(-2px);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.2));
}

/* Custom checkbox styling */
.custom-checkbox .form-check-input {
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 1px solid var(--gray-400, #ced4da);
  background-color: var(--white, #fff);
  transition: all 0.2s ease;
}

.custom-checkbox .form-check-input:checked {
  background-color: var(--primary, #0d6efd);
  border-color: var(--primary, #0d6efd);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.custom-checkbox .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  border-color: var(--primary, #0d6efd);
}

.custom-checkbox .form-check-label {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-700, #495057);
}

/* Social login buttons */
.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300, #dee2e6);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--gray-700, #495057);
  background-color: var(--white, #fff);
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-login-btn:hover {
  background-color: var(--gray-100, #f8f9fa);
  border-color: var(--gray-400, #ced4da);
  color: var(--gray-800, #343a40);
}

.social-login-btn i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

/* Auth separator */
.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--gray-300, #dee2e6);
}

.auth-separator span {
  padding: 0 1rem;
  color: var(--gray-500, #adb5bd);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .input-with-icon .input-icon,
  .password-field .input-icon,
  .password-toggle i {
    font-size: 1.125rem;
  }
}

/* RTL Support */
[dir="rtl"] .input-with-icon .input-icon,
[dir="rtl"] .password-field .input-icon {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .password-toggle {
  right: auto;
  left: 1rem;
}

[dir="rtl"] .input-with-icon .form-control {
  padding-left: 0.75rem;
  padding-right: 3rem;
}

[dir="rtl"] .password-field .form-control {
  padding-right: 3rem;
  padding-left: 3rem;
}
