:host {
  display: contents;
}

.hb-dialog-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.hb-dialog-wrapper--hidden {
  display: none;
}

.hb-dialog__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--hb-color-bg-mask);
  transition: opacity 0.3s;
  pointer-events: auto;
}

.hb-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: var(--hb-dialog-bg);
  border-radius: var(--hb-dialog-radius);
  box-shadow: var(--hb-dialog-shadow);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.hb-dialog--visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.hb-dialog--fullscreen {
  width: 100% !important;
  height: 100vh;
  top: 0;
  left: 0;
  transform: none;
  border-radius: 0;
  max-height: 100vh;
}
.hb-dialog--fullscreen.hb-dialog--visible {
  transform: none;
}

.hb-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--hb-spacing-md) var(--hb-spacing-lg);
  border-bottom: 1px solid var(--hb-color-border-secondary);
}

.hb-dialog__title {
  font-size: var(--hb-font-size-lg);
  font-weight: 600;
  color: var(--hb-color-text-primary);
}

.hb-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  font-size: 18px;
  color: var(--hb-color-text-secondary);
  cursor: pointer;
  border-radius: var(--hb-border-radius-sm);
  transition: all var(--hb-transition-duration);
}

.hb-dialog__close:hover {
  background-color: var(--hb-color-fill-tertiary);
  color: var(--hb-color-text-primary);
}

.hb-dialog__body {
  flex: 1;
  padding: var(--hb-spacing-lg);
  overflow-y: auto;
  color: var(--hb-color-text);
  font-size: var(--hb-font-size-base);
}

.hb-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--hb-spacing-xs);
  padding: var(--hb-spacing-sm) var(--hb-spacing-lg);
  border-top: 1px solid var(--hb-color-border-secondary);
}
