/* File: karvish-maps/frontend/src/components/Login.css */
/* Mobile-first login styles */
/* Version: 1.0.0 */
/* Since: 20-Jan-2026 01:30 PM IST */

.login-container {
  min-height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.login-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  z-index: -1;
}

.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg);
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  color: white;
}

.login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo svg {
  width: 36px;
  height: 36px;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.login-subtitle {
  opacity: 0.9;
  font-size: 0.875rem;
}

/* Form */
.login-form {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
}

.login-error {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

.login-error svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-xs);
}

.form-group input {
  height: var(--touch-target);
  font-size: 1rem;
}

.form-group input::placeholder {
  color: var(--gray-400);
}

/* Button */
.login-button {
  width: 100%;
  height: var(--touch-target);
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.login-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.login-button:active:not(:disabled) {
  transform: translateY(0);
}

.button-loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: var(--space-lg);
  color: white;
  font-size: 0.875rem;
}

.toggle-mode-button {
  color: white;
  font-weight: 600;
  margin-left: var(--space-xs);
  text-decoration: underline;
  background: none;
  border: none;
  font-size: inherit;
  cursor: pointer;
}

.toggle-mode-button:hover {
  opacity: 0.9;
}

/* Hint */
.login-hint {
  text-align: center;
  margin-top: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

/* Tablet and up */
@media (min-width: 768px) {
  .login-content {
    padding: var(--space-2xl);
  }

  .login-logo {
    width: 80px;
    height: 80px;
  }

  .login-logo svg {
    width: 44px;
    height: 44px;
  }

  .login-header h1 {
    font-size: 2rem;
  }

  .login-form {
    padding: var(--space-xl);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .login-background {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--gray-100) 50%);
  }

  .login-content {
    max-width: 440px;
  }
}
