/**
 * BagsAndGo Form Notifications
 * 
 * CSS consolidado para sistema de notificaciones inline
 * 
 * CONSOLIDA estilos de:
 * - style.css (líneas 570-590, 1411-1428)
 * - quick-booking.css (líneas 716-725)
 * - veci-cruceros.css (líneas 608-614)
 * 
 * @file form-notifications.css
 * @version 1.0.0
 */

/* ===============================================
 * STEP-LEVEL ERRORS/SUCCESS
 * =============================================== */

.form-global-error,
.form-global-success {
  padding: 16px 24px;
  margin-bottom: 24px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  display: none; /* Hidden by default */
  animation: slideDownNotification 0.3s ease-out;
}

.form-global-error {
  background-color: var(--clr-error-light, #ffe5e0);
  color: var(--clr-error-text, #c0392b);
  border: 1px solid var(--clr-error-border, #e74c3c);
  border-left: 4px solid var(--clr-error, #e74c3c);
}

.form-global-success {
  background-color: var(--clr-success-light, #d4edda);
  color: var(--clr-success-text, #155724);
  border: 1px solid var(--clr-success-border, #c3e6cb);
  border-left: 4px solid var(--clr-success, #27ae60);
}

/* ===============================================
 * FIELD-LEVEL ERRORS
 * =============================================== */

.form-error-message {
  display: none; /* Hidden by default */
  font-size: 13px;
  line-height: 1.4;
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  animation: fadeInNotification 0.2s ease-out;
}

/* Error type (default) */
.form-error-message,
.form-error-message--error {
  color: var(--clr-error-text, #c0392b);
  background-color: var(--clr-error-light, #ffe5e0);
  border-left: 3px solid var(--clr-error, #e74c3c);
}

/* Warning type */
.form-error-message--warning {
  color: var(--clr-warning-text, #856404);
  background-color: var(--clr-warning-light, #fff3cd);
  border-left: 3px solid var(--clr-warning, #ffc107);
}

/* Info type */
.form-error-message--info {
  color: var(--clr-info-text, #0c5460);
  background-color: var(--clr-info-light, #d1ecf1);
  border-left: 3px solid var(--clr-info, #17a2b8);
}

/* Inline marker style (for required markers like "(requerido)") */
.form-error-message--inline {
  display: inline;
  padding: 0;
  margin: 0 0 0 4px;
  background: none;
  border: none;
  font-size: inherit;
  color: var(--clr-error, #e74c3c);
}

/* Input error state - CONSOLIDADO */
.step input.error,
.step select.error,
.step textarea.error,
.step .lr-date-input.error,
.veci-cruceros-container .field-group input.error,
.veci-cruceros-container .field-group select.error,
.veci-cruceros-container .field-group textarea.error,
.form-field.error input,
.form-field.error select,
.form-field.error textarea {
  border-color: var(--clr-error, #e74c3c) !important;
  background-color: var(--clr-error-light, #ffe5e0);
}

.step input.error:focus,
.step select.error:focus,
.step textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
  outline: none;
}

/* ===============================================
 * CONFIRM MODAL
 * =============================================== */

.bags-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.bags-confirm-overlay--visible {
  opacity: 1;
}

.bags-confirm-modal {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bags-confirm-modal--visible {
  transform: scale(1);
  opacity: 1;
}

.bags-confirm-modal__message {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 24px 0;
  text-align: center;
}

.bags-confirm-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.bags-confirm-modal__btn {
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 120px;
}

.bags-confirm-modal__btn--cancel {
  background: #f5f5f5;
  color: #666;
}

.bags-confirm-modal__btn--cancel:hover {
  background: #e0e0e0;
  color: #333;
}

.bags-confirm-modal__btn--confirm {
  background: var(--clr-primary, #3498db);
  color: white;
}

.bags-confirm-modal__btn--confirm:hover {
  background: var(--clr-primary-dark, #2980b9);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Variant danger (acciones destructivas) */
.bags-confirm-modal--danger .bags-confirm-modal__message {
  color: #c0392b;
}

.bags-confirm-modal--danger .bags-confirm-modal__btn--confirm {
  background: var(--clr-error, #e74c3c);
}

.bags-confirm-modal--danger .bags-confirm-modal__btn--confirm:hover {
  background: #c0392b;
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* ===============================================
 * ANIMATIONS
 * =============================================== */

@keyframes slideDownNotification {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInNotification {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===============================================
 * INLINE NOTIFICATIONS (para zonas, direcciones, etc.)
 * =============================================== */

.inline-notification {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
  animation: fadeInNotification 0.2s ease-out;
}

.inline-notification__icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.inline-notification__content {
  flex: 1;
}

.inline-notification__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.inline-notification__message {
  opacity: 0.9;
}

/* Types */
.inline-notification--error {
  background-color: #ffebee;
  border-left: 4px solid #f44336;
  color: #c62828;
}

.inline-notification--warning {
  background-color: #fff3e0;
  border-left: 4px solid #ff9800;
  color: #e65100;
}

.inline-notification--info {
  background-color: #e3f2fd;
  border-left: 4px solid #2196f3;
  color: #1565c0;
}

.inline-notification--success {
  background-color: #e8f5e9;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

/* ===============================================
 * RESPONSIVE
 * =============================================== */

@media (max-width: 768px) {
  .bags-confirm-modal {
    padding: 24px;
    width: calc(100% - 32px);
  }

  .bags-confirm-modal__actions {
    flex-direction: column;
    gap: 8px;
  }

  .bags-confirm-modal__btn {
    width: 100%;
    min-width: unset;
  }

  .form-global-error,
  .form-global-success {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* ===============================================
 * ACCESSIBILITY
 * =============================================== */

/* Respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .form-global-error,
  .form-global-success,
  .form-error-message,
  .bags-confirm-overlay,
  .bags-confirm-modal {
    animation: none !important;
    transition: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bags-confirm-modal {
    border: 2px solid currentColor;
  }

  .form-global-error,
  .form-global-success {
    border-width: 2px;
  }
}

/* Focus visible (keyboard navigation) */
.bags-confirm-modal__btn:focus-visible {
  outline: 2px solid var(--clr-primary, #3498db);
  outline-offset: 2px;
}

.bags-confirm-modal--danger .bags-confirm-modal__btn--confirm:focus-visible {
  outline-color: var(--clr-error, #e74c3c);
}

/* ===============================================
 * LOADING STATE (opcional para futuro)
 * =============================================== */

.bags-confirm-modal__btn--loading {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

.bags-confirm-modal__btn--loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spinLoader 0.6s linear infinite;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}
