@use '../../styles/variables' as *;

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--island-bg-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--modal-shadow);
  width: 100%;
  max-width: 420px;
  padding: var(--space-6);
  animation: slideUp 0.2s ease;
}

.header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.iconWarning {
  color: var(--color-warning-darker);
}

.iconDanger {
  color: var(--color-danger);
}

.iconInfo {
  color: var(--color-primary);
}

.title {
  flex: 1;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-on-surface);
  margin: 0;
}

.closeBtn {
  background: none;
  border: none;
  color: var(--color-gray-60);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    background: var(--color-surface-low);
    color: var(--color-on-surface);
  }
}

.message {
  font-size: var(--text-sm);
  color: var(--color-gray-70);
  line-height: 1.5;
  margin-bottom: var(--space-6);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.btnPrimary,
.btnSecondary,
.btnDanger {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.btnPrimary {
  background: var(--color-primary);
  color: white;

  &:hover {
    background: var(--color-primary-hover);
  }
}

.btnSecondary {
  background: var(--color-surface-low);
  color: var(--color-on-surface);
  border: 1px solid var(--color-gray-20);

  &:hover {
    background: var(--color-gray-10);
  }
}

.btnDanger {
  background: var(--color-danger);
  color: white;

  &:hover {
    background: var(--color-danger-dark);
  }
}

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

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