/**
 * RPM Auth Modern Styles
 * 
 * Modern authentication pages with gradient backgrounds
 * Used for login/register standalone pages
 * 
 * @package Rental_Property_Manager
 * @subpackage Assets
 * @since 1.0.0
 * @version 2.0.0
 */

/* ==========================================================================
   Auth Wrapper - Full Page Background
   ========================================================================== */
.rpm-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative background elements */
.rpm-auth-wrapper::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: float 20s ease-in-out infinite;
}

.rpm-auth-wrapper::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 70%
  );
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ==========================================================================
   Auth Card - Main Container
   ========================================================================== */
.rpm-auth-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 48px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease;
  backdrop-filter: blur(10px);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Auth Header
   ========================================================================== */
.rpm-auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.rpm-auth-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 50%;
  font-size: 36px;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.4);
  }
}

/* Resident icon variant */
.rpm-auth-icon-resident {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.rpm-auth-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.rpm-auth-header p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.rpm-auth-card .rpm-form-group {
  margin-bottom: 24px;
}

.rpm-auth-card .rpm-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.rpm-auth-card .rpm-form-group input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  color: #111827;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rpm-auth-card .rpm-form-group input::placeholder {
  color: #9ca3af;
}

.rpm-auth-card .rpm-form-group input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.rpm-auth-card .rpm-form-group input:disabled {
  background: #e5e7eb;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Form row for side-by-side inputs */
.rpm-auth-card .rpm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* Form hint text */
.rpm-auth-card .rpm-form-hint {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
  display: block;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.rpm-auth-card .rpm-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rpm-auth-card .rpm-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.rpm-auth-card .rpm-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.rpm-auth-card .rpm-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.rpm-auth-card .rpm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Google Sign In Button */
.rpm-auth-card .rpm-btn-google {
  background: #ffffff;
  color: #374151;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.rpm-auth-card .rpm-btn-google:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-2px);
}

/* ==========================================================================
   Messages
   ========================================================================== */
.rpm-message {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  display: none;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rpm-message-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.rpm-message-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   Auth Footer
   ========================================================================== */
.rpm-auth-footer {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.rpm-auth-footer p {
  margin: 0 0 16px 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.rpm-auth-links {
  margin-top: 24px;
  text-align: center;
}

.rpm-auth-links a {
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.rpm-auth-links a:hover {
  color: #1d4ed8;
  text-decoration: underline;
  transform: translateY(-1px);
}

/* Divider with text */
.rpm-auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.rpm-auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.rpm-auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 12px;
  background: #ffffff;
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

/* ==========================================================================
   Selected Unit Preview
   ========================================================================== */
.rpm-selected-preview {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 32px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.rpm-preview-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rpm-preview-value {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
}

/* ==========================================================================
   Features List
   ========================================================================== */
.rpm-auth-features {
  background: #f9fafb;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.rpm-auth-features h4 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rpm-auth-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rpm-auth-features li {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #4b5563;
}

.rpm-auth-features li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #10b981;
  color: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   Loading State
   ========================================================================== */
.rpm-auth-card .rpm-btn.loading {
  position: relative;
  color: transparent;
}

.rpm-auth-card .rpm-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 640px) {
  .rpm-auth-wrapper {
    padding: 40px 16px;
  }

  .rpm-auth-card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .rpm-auth-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  .rpm-auth-header h1 {
    font-size: 26px;
  }

  .rpm-auth-card .rpm-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rpm-auth-card .rpm-form-group input {
    padding: 12px 16px;
    font-size: 15px;
  }

  .rpm-auth-card .rpm-btn {
    padding: 14px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .rpm-auth-wrapper {
    padding: 20px 12px;
  }

  .rpm-auth-card {
    padding: 24px 20px;
  }

  .rpm-auth-header {
    margin-bottom: 32px;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
.rpm-auth-card .rpm-form-group input:focus {
  outline: none;
}

.rpm-auth-card .rpm-btn:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .rpm-auth-wrapper::before,
  .rpm-auth-wrapper::after,
  .rpm-auth-card,
  .rpm-auth-icon,
  .rpm-message {
    animation: none;
  }

  .rpm-auth-card .rpm-btn,
  .rpm-auth-links a,
  .rpm-auth-card .rpm-form-group input {
    transition: none;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .rpm-auth-wrapper {
    background: #ffffff;
    min-height: auto;
  }

  .rpm-auth-wrapper::before,
  .rpm-auth-wrapper::after {
    display: none;
  }

  .rpm-auth-card {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}
