.gift-catalog-icon-thumbnail {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
}

.gift-catalog-icon-source {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #4b5563;
  background: #f9fafb;
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

.gift-catalog-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.gift-catalog-status:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.gift-catalog-status:not(:disabled):hover,
.gift-catalog-status:not(:disabled):focus-visible {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #94a3b8;
  outline: none;
}

.gift-catalog-status--active {
  color: #166534;
  background: #dcfce7;
}

.gift-catalog-status--inactive {
  color: #4b5563;
  background: #f3f4f6;
}

.gift-catalog-status-edit {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #111827;
  background: #ffffff;
  font: inherit;
  letter-spacing: 0;
}

.gift-catalog-icon-editor {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.gift-catalog-icon-editor__fields {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.gift-catalog-icon-editor__url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

.gift-catalog-icon-editor__built-in {
  color: #1d4ed8;
  font-size: 13px;
  letter-spacing: 0;
}

.gift-catalog-icon-editor__progress {
  color: #4b5563;
  font-size: 13px;
  letter-spacing: 0;
}

.gift-catalog-animation-upload {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f8fafc;
}

.gift-catalog-animation-upload__input {
  display: none;
}

.gift-catalog-animation-upload__preview,
.gift-catalog-animation-upload__placeholder {
  width: 112px;
  height: 112px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

.gift-catalog-animation-upload__preview {
  display: block;
  object-fit: contain;
}

.gift-catalog-animation-upload__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.gift-catalog-animation-upload__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.gift-catalog-animation-upload__status {
  color: #475569;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.gift-catalog-animation-upload__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gift-catalog-animation-upload__actions .gift-catalog-modal__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
}

.gift-catalog-animation-preview__trigger {
  position: relative;
  display: block;
  width: 160px;
  height: 120px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #0f172a;
  cursor: pointer;
}

.gift-catalog-animation-preview__trigger--compact {
  width: 64px;
  height: 64px;
}

.gift-catalog-animation-preview__thumbnail,
.gift-catalog-animation-preview__detail-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gift-catalog-animation-preview__play {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
}

.gift-catalog-animation-preview__play .adminjs_Icon {
  width: 14px;
  height: 14px;
}

.gift-catalog-animation-preview__type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  color: #334155;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.gift-catalog-animation-preview__overlay {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.gift-catalog-animation-preview__dialog {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
}

.gift-catalog-animation-preview__header {
  display: flex;
  align-items: center;
  min-height: 60px;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.gift-catalog-animation-preview__title {
  flex: 1;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
}

.gift-catalog-animation-preview__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #475569;
  background: transparent;
  cursor: pointer;
}

.gift-catalog-animation-preview__close:hover,
.gift-catalog-animation-preview__close:focus-visible {
  color: #0f172a;
  background: #f1f5f9;
  outline: none;
}

.gift-catalog-animation-preview__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 20px;
  background: #0f172a;
}

.gift-catalog-animation-preview__media {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

.gift-catalog-modal__detail-animation-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gift-catalog-modal__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  background: #ffffff;
  cursor: pointer;
}

.gift-catalog-modal__icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.gift-catalog-page .search-filter-toolbar {
  margin-bottom: 10px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #f8fafc;
}

.gift-catalog-page__table-panel {
  overflow: hidden;
}

.gift-catalog-page__table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 0;
  border-radius: 0;
}

.gift-catalog-page__table {
  width: max-content;
  min-width: 1120px;
  border-collapse: collapse;
}

.gift-catalog-page__name-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gift-catalog-translations__trigger-wrap {
  position: relative;
  flex: 0 0 auto;
}

.gift-catalog-translations__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: transparent;
  cursor: pointer;
}

.gift-catalog-translations__trigger:hover,
.gift-catalog-translations__trigger[aria-expanded="true"] {
  color: #1d4ed8;
  background: #eff6ff;
}

.gift-catalog-translations__trigger:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.gift-catalog-translations__trigger .adminjs_Icon {
  width: 16px;
  height: 16px;
}

.gift-catalog-translations__popover {
  position: fixed;
  z-index: 1400;
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  padding: 16px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
}

.gift-catalog-translations__title {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.gift-catalog-translations__list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gift-catalog-translations__list > span {
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.gift-catalog-translations__locale {
  color: #0f172a;
  font-weight: 600;
}

@media (max-width: 640px) {
  .gift-catalog-animation-preview__overlay {
    padding: 12px;
  }

  .gift-catalog-animation-preview__stage {
    min-height: 240px;
    padding: 12px;
  }

  .gift-catalog-modal__detail-animation-row {
    flex-direction: column;
  }
}

.gift-catalog-page__table th,
.gift-catalog-page__table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--admin-page-table-divider);
  text-align: left;
  vertical-align: middle;
}

.gift-catalog-page__table th:first-child,
.gift-catalog-page__table td:first-child {
  width: 92px;
}

.gift-catalog-page__table th:last-child,
.gift-catalog-page__table td:last-child {
  width: 92px;
}

.gift-catalog-page__empty-state {
  padding: 40px 24px;
  color: #64748b;
  text-align: center;
}

.gift-catalog-modal {
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.gift-catalog-modal__dialog {
  width: min(820px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  border-radius: 8px;
}

.gift-catalog-modal__header {
  min-height: 80px;
  padding: 16px 24px;
}

.gift-catalog-modal__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gift-catalog-modal__header-icon {
  display: block;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
}

.gift-catalog-modal__header-icon--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #f1f5f9;
}

.gift-catalog-modal__header-icon--fallback .adminjs_Icon {
  width: 22px;
  height: 22px;
}

.gift-catalog-modal__subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.gift-catalog-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.gift-catalog-modal__close:hover,
.gift-catalog-modal__close:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.gift-catalog-modal__close:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.gift-catalog-modal__close .adminjs_Icon {
  width: 18px;
  height: 18px;
}

.gift-catalog-modal__body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
  background: #ffffff;
}

.gift-catalog-modal__form-grid,
.gift-catalog-modal__detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.gift-catalog-modal__field,
.gift-catalog-modal__detail-field {
  min-width: 0;
}

.gift-catalog-modal__field--wide,
.gift-catalog-modal__detail-field--wide {
  grid-column: 1 / -1;
}

.gift-catalog-modal__label,
.gift-catalog-modal__detail-label {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.gift-catalog-modal__label [aria-hidden="true"] {
  color: #dc2626;
}

.payment-product-modal__label-with-tip {
  display: flex;
  align-items: center;
  gap: 6px;
}

.payment-product-modal__tip {
  position: relative;
  display: inline-flex;
  color: inherit;
}

.payment-product-modal__tip-trigger {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: help;
}

.payment-product-modal__tip-trigger svg {
  width: 12px;
  height: 12px;
}

.payment-product-modal__tip-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 4;
  display: none;
  width: min(320px, calc(100vw - 40px));
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  transform: translateX(-50%);
}

.payment-product-modal__tip:hover .payment-product-modal__tip-popover,
.payment-product-modal__tip:focus-within .payment-product-modal__tip-popover {
  display: block;
}

.gift-catalog-modal__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  color: #111827;
  font: inherit;
  letter-spacing: 0;
}

.gift-catalog-modal__input:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.gift-catalog-modal__input:disabled,
.gift-catalog-modal__input[readonly],
.gift-catalog-modal__input--locked {
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #d1d5db;
  color: #64748b;
  opacity: 1;
}

.gift-catalog-modal__input[readonly],
.gift-catalog-modal__input--locked[readonly] {
  cursor: default;
}

.gift-catalog-modal__field-error,
.gift-catalog-modal__submit-error {
  margin-top: 6px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.4;
}

.gift-catalog-modal__icon-editor {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.gift-catalog-modal__icon-fields {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.gift-catalog-modal__detail-grid {
  gap: 0 36px;
}

.gift-catalog-modal__detail-field {
  padding: 14px 0;
  border-bottom: 1px solid #eef2f7;
}

.gift-catalog-modal__detail-label {
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 12px;
}

.gift-catalog-modal__detail-value {
  min-height: 21px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
}

.gift-catalog-modal__detail-icon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.gift-catalog-modal__url-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gift-catalog-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px 24px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.gift-catalog-modal__submit-error {
  margin: 0;
}

.gift-catalog-modal__actions {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.gift-catalog-modal__button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.gift-catalog-modal__button--secondary {
  background: #ffffff;
  color: #475569;
}

.gift-catalog-modal__button--primary {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.gift-catalog-modal__button:hover:not(:disabled) {
  filter: brightness(0.96);
}

.gift-catalog-modal__button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 640px) {
  .gift-catalog-animation-upload {
    grid-template-columns: minmax(0, 1fr);
  }

  .gift-catalog-icon-editor {
    flex-direction: column;
  }

  .gift-catalog-icon-editor__fields {
    width: 100%;
  }

  .gift-catalog-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .gift-catalog-modal__dialog {
    max-height: calc(100vh - 24px);
  }

  .gift-catalog-modal__header,
  .gift-catalog-modal__body,
  .gift-catalog-modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .gift-catalog-modal__form-grid,
  .gift-catalog-modal__detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gift-catalog-modal__icon-editor,
  .gift-catalog-modal__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .gift-catalog-modal__actions {
    width: 100%;
  }

  .gift-catalog-modal__button {
    flex: 1;
  }
}
