.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  animation: modal-overlay-fade-in 0.2s ease-out;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: modal-content-slide-in 0.3s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Size variants */
.modal-content--sm {
  max-width: 300px;
}

.modal-content--md {
  max-width: 500px;
}

.modal-content--lg {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  padding-right: 2rem;
  flex: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: #64748b;
}

.modal-close:hover {
  background-color: #f8fafc;
  color: #1e293b;
  transform: scale(1.05);
}

.modal-close:active {
  transform: scale(0.95);
}

.modal-close-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(90vh - 4rem);
}

/* When there's no title, add extra top padding to account for close button */
.modal-header--no-title + .modal-body {
  padding-top: 3rem;
}

/* Animations */
@keyframes modal-overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-content-slide-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Focus styles for accessibility */
.modal-close:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.modal-close:focus:not(:focus-visible) {
  outline: none;
}
