/* HandyGo Login Page - Additional Enhancements */
/* تحسينات إضافية لصفحة تسجيل الدخول */

/* Enhanced Button Styles */
.main-buttons-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: stretch;
}

.btn-half {
  width: calc(50% - 5px);
  margin-bottom: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.btn-secondary {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: var(--white);
  box-shadow: var(--shadow-light);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Enhanced Google Button */
.btn-google {
  background: var(--white);
  color: var(--text-primary);
  border: 2px solid #e2e8f0;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-google:hover {
  background: #f8fafc;
  border-color: #4285f4;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 133, 244, 0.15);
}

.btn-google:focus {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}

/* Ripple Effect Enhancement */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
  z-index: 1;
}

@keyframes ripple-animation {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced Forgot Password Link */
.forgot-password {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 15px 0;
  display: block;
  text-align: center;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  background: transparent;
}

.forgot-password:hover {
  color: var(--primary-color);
  background: rgba(21, 101, 192, 0.05);
  transform: translateY(-1px);
}

.forgot-password i {
  margin-left: 5px;
  font-size: 0.8rem;
}

/* Loading States Enhancement */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

/* Enhanced Form Validation */
.form-input.valid {
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-input.invalid {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Success Animation */
@keyframes success-bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

.message.success {
  animation: success-bounce 1s ease-in-out;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 480px) {
  .main-buttons-row {
    flex-direction: column;
    gap: 10px;
  }

  .btn-half {
    width: 100%;
    min-height: 45px;
  }

  .btn {
    font-size: 0.9rem;
    padding: 12px 15px;
  }

  .btn-google {
    padding: 12px 15px;
  }

  .google-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 360px) {
  .btn-half {
    font-size: 0.8rem;
    min-height: 42px;
  }

  .welcome-text {
    font-size: 1.2rem;
  }

  .login-container {
    padding: 20px 15px;
  }
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {
  .ripple {
    animation: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .message.success {
    animation: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .btn-secondary {
    background: #28a745;
    border: 2px solid #000;
  }
  
  .btn-google {
    border: 2px solid #000;
  }
  
  .forgot-password {
    border: 1px solid currentColor;
  }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-light: #718096;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
  }
}

/* Print Styles */
@media print {
  .btn, .links-section {
    display: none;
  }
  
  .login-container {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .bg-shapes {
    display: none;
  }
}

/* Enhanced Focus Indicators */
.btn:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-secondary:focus-visible {
  outline-color: #28a745;
}

.btn-google:focus-visible {
  outline-color: #4285f4;
}

/* Smooth Page Transitions */
.page-transition {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.page-transition.fade-out {
  opacity: 0;
}

/* Enhanced Button Icons */
.btn i {
  transition: transform 0.2s ease;
}

.btn:hover i {
  transform: scale(1.1);
}

.btn.loading i {
  display: none;
}

/* Custom Scrollbar for Mobile */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}