/**
 * Form Notifications & Loading Styles
 * Espinoza Installation Solutions
 * 
 * @version 1.0
 * @date 2025-10-28
 */

/* ========================================
   NOTIFICATION STYLES
   ======================================== */

.form-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  min-width: 320px;
  max-width: 500px;
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Outfit', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* Success Notification */
.form-notification-success .notification-content {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-left: 5px solid #1e7e34;
}

.form-notification-success .notification-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

/* Error Notification */
.form-notification-error .notification-content {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border-left: 5px solid #bd2130;
}

.form-notification-error .notification-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

/* Notification Message */
.notification-message {
  flex: 1;
  font-weight: 500;
}

/* Close Button */
.notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Fade Out Animation */
.form-notification.fade-out {
  animation: slideOutRight 0.3s ease-out forwards;
}

/* ========================================
   FORM LOADING OVERLAY
   ======================================== */

.form-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 8px;
}

.form-loading-spinner {
  text-align: center;
}

.form-loading-spinner .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #CC0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.form-loading-spinner p {
  color: #111827;
  font-family: 'Outfit', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

/* ========================================
   RECAPTCHA BADGE STYLING
   ======================================== */

.grecaptcha-badge {
  visibility: visible !important;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.grecaptcha-badge:hover {
  opacity: 1;
}

/* Optional: Hide reCAPTCHA badge and show text instead */
.recaptcha-notice {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  text-align: center;
  font-family: 'Outfit', Arial, sans-serif;
}

.recaptcha-notice a {
  color: #CC0000;
  text-decoration: none;
}

.recaptcha-notice a:hover {
  text-decoration: underline;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .form-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
  }
  
  .notification-content {
    padding: 15px;
    font-size: 14px;
  }
  
  .notification-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
  }
  
  .notification-close {
    width: 24px;
    height: 24px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .form-notification {
    top: 5px;
    right: 5px;
    left: 5px;
  }
  
  .notification-content {
    padding: 12px;
    font-size: 13px;
    gap: 10px;
  }
  
  .form-loading-spinner .spinner {
    width: 40px;
    height: 40px;
  }
  
  .form-loading-spinner p {
    font-size: 14px;
  }
}

/* ========================================
   FORM BUTTON LOADING STATE
   ======================================== */

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button[type="submit"] .fa-spinner {
  animation: spin 1s linear infinite;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.form-notification:focus {
  outline: 2px solid #CC0000;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .form-notification,
  .form-notification.fade-out,
  .notification-close,
  .form-loading-spinner .spinner {
    animation: none !important;
    transition: none !important;
  }
}
