/**
 * Global Confirmation Modal Component
 * 
 * A reusable confirmation dialog that can be triggered from any page.
 * Follows the GeoFazendas design system.
 */

/* Body state when modal is open */
body.is-gf-modal-open {
  overflow: hidden;
}

/* Modal Container */
.gf-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.gf-confirm-modal[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Backdrop */
.gf-confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Dialog Box */
.gf-confirm-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  text-align: center;
  transform: scale(1);
  transition: transform 0.2s ease;
}

.gf-confirm-modal[aria-hidden="true"] .gf-confirm-modal__dialog {
  transform: scale(0.95);
}

/* Close Button */
.gf-confirm-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  border-radius: 0.5rem;
  color: var(--gf-color-neutral-500);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.gf-confirm-modal__close:hover,
.gf-confirm-modal__close:focus-visible {
  background-color: var(--gf-color-neutral-100);
  color: var(--gf-color-neutral-700);
}

.gf-confirm-modal__close .material-icons {
  font-size: 1.25rem;
}

/* Header */
.gf-confirm-modal__header {
  margin-bottom: 1.5rem;
}

/* Icon */
.gf-confirm-modal__icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.gf-confirm-modal__icon .material-icons,
.gf-confirm-modal__icon .material-icons-outlined {
  font-size: 2rem;
}

/* Icon Variants */
.gf-confirm-modal__icon--warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.gf-confirm-modal__icon--error {
  background-color: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.gf-confirm-modal__icon--info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.gf-confirm-modal__icon--help {
  background-color: rgba(var(--gf-color-primary-rgb), 0.1);
  color: var(--gf-color-primary);
}

/* Title */
.gf-confirm-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gf-color-neutral-900);
  margin: 0 0 0.5rem;
}

/* Message */
.gf-confirm-modal__message {
  font-size: 0.9375rem;
  color: var(--gf-color-neutral-600);
  margin: 0;
  line-height: 1.5;
}

/* Footer */
.gf-confirm-modal__footer {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.gf-confirm-modal__footer .btn {
  min-width: 120px;
}

/* Responsive */
@media (max-width: 575.98px) {
  .gf-confirm-modal__dialog {
    padding: 1.5rem;
  }
  
  .gf-confirm-modal__footer {
    flex-direction: column-reverse;
  }
  
  .gf-confirm-modal__footer .btn {
    width: 100%;
  }
}
