/* Modal Component Styles */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.modal--active {
  display: flex;
}

.modal__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: var(--z-modal-backdrop);
  animation: fadeIn var(--transition-normal);
}

.modal__content {
  position: relative;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: var(--z-modal);
  animation: slideUp var(--transition-normal);
}

.modal__header {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin: 0;
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.modal__body {
  padding: var(--spacing-xl);
}

.modal__footer {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Modal sizes */
.modal__content--sm {
  max-width: 400px;
}

.modal__content--lg {
  max-width: 800px;
}

.modal__content--xl {
  max-width: 1200px;
}

/* Responsive */
@media (max-width: 768px) {
  .modal {
    padding: 0;
  }

  .modal__content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal__footer {
    flex-direction: column;
  }

  .modal__footer .btn {
    width: 100%;
  }
}
