.snaf-hotel-images-display {
  margin: 16px 0;
}

.snaf-hotel-images-display.is-empty {
  display: none;
}

.snaf-hotel-images-main {
  margin: 0;
}

.snaf-hotel-image-frame {
  position: relative;
}

.snaf-hotel-images-main img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
}

.snaf-hotel-images-main figcaption {
  margin-top: 8px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.snaf-hotel-image-admin {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #8bb8e8;
  border-radius: 6px;
  background: #eef7ff;
}

.snaf-hotel-image-admin button,
.snaf-hotel-image-admin input,
.snaf-hotel-image-caption-editor button,
.snaf-hotel-image-caption-editor input {
  box-sizing: border-box;
  font: inherit;
}

.snaf-hotel-image-admin__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.snaf-hotel-image-admin__header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.snaf-hotel-image-admin__toggle,
.snaf-hotel-image-admin__media,
.snaf-hotel-image-list__tab,
.snaf-hotel-image-caption-editor button,
.snaf-hotel-image-import button,
.snaf-hotel-image-item__actions button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #9aa8b7;
  border-radius: 4px;
  background: #fff;
  color: #1f2933;
  cursor: pointer;
}

.snaf-hotel-image-admin__toggle {
  border-color: #2d73b9;
  background: #d9ecff;
  color: #17456f;
  font-weight: 700;
}

.snaf-hotel-image-admin__toggle:hover,
.snaf-hotel-image-admin__media:hover,
.snaf-hotel-image-list__tab:hover,
.snaf-hotel-image-caption-editor button:hover,
.snaf-hotel-image-import button:hover,
.snaf-hotel-image-item__actions button:hover {
  border-color: #52616f;
}

.snaf-hotel-image-admin__edit-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #b8c1cc;
  border-radius: 4px;
  background: transparent;
  color: #52616f;
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
}

.snaf-hotel-image-admin__edit-link:hover {
  border-color: #52616f;
  color: #1f2933;
  text-decoration: none;
}

.snaf-hotel-image-admin button:disabled,
.snaf-hotel-image-caption-editor button:disabled {
  cursor: default;
  opacity: 0.45;
}

.snaf-hotel-image-admin__body {
  margin-top: 12px;
}

.snaf-hotel-image-import {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.snaf-hotel-image-import input,
.snaf-hotel-image-caption-editor input,
.snaf-hotel-image-item__controls input {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #c7d0da;
  border-radius: 4px;
  background: #fff;
}

.snaf-hotel-image-caption-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #d7dce2;
  border-radius: 4px;
  background: #f8fafc;
}

.snaf-hotel-image-caption-editor.is-saved {
  border-color: #2f8f46;
}

.snaf-hotel-image-caption-editor.is-view-mode {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.snaf-hotel-image-caption-editor.is-view-mode button,
.snaf-hotel-image-caption-editor.is-view-mode .snaf-hotel-image-caption-editor__gallery {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-color: #c8d1dc;
  background: rgba(255, 255, 255, 0.92);
  color: #52616f;
  box-shadow: 0 2px 8px rgba(72, 45, 20, 0.18);
}

.snaf-hotel-image-caption-editor__button.is-icon,
.snaf-hotel-image-caption-editor__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.snaf-hotel-image-caption-editor__button.is-icon svg,
.snaf-hotel-image-caption-editor__tool svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.snaf-hotel-image-caption-editor__gallery {
  margin-left: 8px;
  border: 1px solid #c8d1dc;
  border-radius: 4px;
  background: #fff;
  color: #52616f;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(72, 45, 20, 0.18);
}

.snaf-hotel-image-caption-editor__gallery:hover {
  border-color: #52616f;
  color: #1f2933;
}

.snaf-hotel-image-remote-import {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.snaf-hotel-image-remote-import__source,
.snaf-hotel-image-remote-import button {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(72, 45, 20, 0.18);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.snaf-hotel-image-remote-import__source {
  border: 1px solid rgba(217, 119, 6, 0.45);
  background: rgba(255, 247, 237, 0.94);
  color: #9a4f00;
}

.snaf-hotel-image-remote-import button {
  border: 1px solid #9aa8b7;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2933;
  cursor: pointer;
  pointer-events: auto;
}

.snaf-hotel-image-remote-import button:hover {
  border-color: #52616f;
}

.snaf-hotel-image-remote-import button:disabled {
  cursor: default;
  opacity: 0.55;
}

.snaf-hotel-image-caption-editor__exclude {
  margin-left: auto;
}

.snaf-hotel-image-caption-editor.is-view-mode .snaf-hotel-image-caption-editor__destroy {
  border-color: #a11d1d;
  background: #c62828;
  color: #fff;
}

.snaf-hotel-image-caption-editor.is-view-mode .snaf-hotel-image-caption-editor__destroy:hover {
  border-color: #7f1111;
  background: #a11d1d;
  color: #fff;
}

.snaf-hotel-image-caption-editor:not(.is-view-mode) .snaf-hotel-image-caption-editor__tool {
  display: none;
}

.snaf-hotel-image-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.snaf-hotel-image-list__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d7dce2;
}

.snaf-hotel-image-list__tab {
  min-height: 32px;
  padding: 5px 10px;
  border-color: #c7d0da;
  background: #fff;
  color: #52616f;
  font-size: 0.88rem;
  font-weight: 700;
}

.snaf-hotel-image-list__tab.is-active {
  border-color: #52616f;
  background: #1f2933;
  color: #fff;
}

.snaf-hotel-image-list__tab.has-items:not(.is-active) {
  border-color: #d97706;
  color: #9a4f00;
}

.snaf-hotel-image-list__panels {
  display: grid;
  gap: 8px;
}

.snaf-hotel-image-candidates {
  margin-top: 10px;
  border: 1px solid #8bb8e8;
  border-radius: 4px;
  background: #eef7ff;
}

.snaf-hotel-image-candidates__summary {
  min-height: 36px;
  padding: 8px 12px;
  color: #17456f;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.snaf-hotel-image-candidates__summary:hover {
  background: #d9ecff;
}

.snaf-hotel-image-candidates[open] .snaf-hotel-image-candidates__summary {
  border-bottom: 1px solid #8bb8e8;
}

.snaf-hotel-image-candidates__body {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f8fbff;
}

.snaf-hotel-image-candidates.is-disabled {
  border-color: #e1e5ea;
  background: #f4f6f8;
  opacity: 0.72;
}

.snaf-hotel-image-candidates.is-disabled .snaf-hotel-image-candidates__summary {
  color: #7b8794;
  cursor: default;
}

.snaf-hotel-image-candidates.is-disabled .snaf-hotel-image-candidates__summary:hover {
  background: transparent;
}

.snaf-hotel-image-candidates.is-disabled .snaf-hotel-image-list__empty {
  display: none;
}

.snaf-hotel-image-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.snaf-hotel-image-list__group {
  display: grid;
  gap: 8px;
}

.snaf-hotel-image-list__group[hidden] {
  display: none !important;
}

.snaf-hotel-image-list__title {
  color: #52616f;
  font-size: 0.88rem;
  font-weight: 700;
}

.snaf-hotel-image-list__empty {
  margin: 0;
  color: #697684;
  font-size: 0.88rem;
}

.snaf-hotel-image-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px;
  border: 1px solid #e0e5eb;
  border-radius: 4px;
  background: #fff;
}

.snaf-hotel-image-item.is-saved {
  border-color: #2f8f46;
}

.snaf-hotel-image-item__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: #eef2f6;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
  cursor: zoom-in;
}

.snaf-hotel-image-item__thumb:hover {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  width: min(100%, 520px);
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid #c7d0da;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.28);
  transform: scale(1.01);
}

.snaf-hotel-image-item__controls {
  display: grid;
  gap: 8px;
}

.snaf-hotel-image-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.snaf-hotel-image-item__tags {
  color: #697684;
  font-size: 0.84rem;
  line-height: 1.5;
}

.snaf-hotel-image-item__actions .is-secondary {
  border-color: #b8c1cc;
  color: #52616f;
}

.snaf-hotel-image-item__actions .is-destructive {
  border-color: #a11d1d;
  background: #c62828;
  color: #fff;
}

.snaf-hotel-image-item__actions .is-destructive:hover {
  border-color: #7f1111;
  background: #a11d1d;
  color: #fff;
}

.snaf-hotel-image-error {
  margin: 8px 0 0;
  color: #a11d1d;
  font-size: 0.9rem;
}

.snaf-hotel-header-warning {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 24px));
  margin: 14px auto 18px;
  padding: 18px 20px;
  border: 3px solid #b91c1c;
  border-radius: 6px;
  background: #fff1f2;
  color: #7f1d1d;
  box-shadow: 0 4px 14px rgba(127, 29, 29, 0.16);
}

.snaf-hotel-header-warning__title {
  margin: 0 0 10px;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.45;
}

.snaf-hotel-header-warning__list {
  margin: 0;
  padding-left: 1.25em;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.75;
}

.snaf-hotel-header-warning__list li + li {
  margin-top: 8px;
}

.snaf-hotel-missing-panel {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #d9a441;
  border-radius: 6px;
  background: #fff8e6;
  color: #3c3320;
}

.snaf-hotel-missing-panel__title {
  margin: 0 0 8px;
  font-weight: 700;
}

.snaf-hotel-missing-panel__counts {
  margin: 0 0 8px;
  font-weight: 700;
}

.snaf-hotel-missing-panel__table {
  margin: 10px 0;
  overflow-x: auto;
}

.snaf-hotel-missing-panel table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.snaf-hotel-missing-panel th,
.snaf-hotel-missing-panel td {
  padding: 7px 8px;
  border: 1px solid #ead8a9;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.snaf-hotel-missing-panel th {
  background: #fff0c7;
  font-weight: 700;
}

.snaf-hotel-missing-panel button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #9f741f;
  border-radius: 4px;
  background: #fff;
  color: #3c3320;
  cursor: pointer;
}

.snaf-hotel-missing-panel__message {
  margin: 0;
  font-weight: 700;
}

.snaf-hotel-image-notes {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

.snaf-hotel-image-notes.is-empty,
.snaf-hotel-image-note.is-empty {
  display: none;
}

.snaf-hotel-image-note {
  margin: 18px 0;
}

.snaf-hotel-image-note img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
}

.snaf-hotel-image-note figcaption {
  margin-top: 8px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .snaf-hotel-image-import {
    grid-template-columns: 1fr;
  }

  .snaf-hotel-image-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .snaf-hotel-image-item__thumb {
    width: 56px;
    height: 56px;
  }
}
