/* Interaction and dialog refinements kept separate from the core theme. */
.quick-item > .quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-family: Arial, sans-serif;
  font-size: 20px;
  text-align: center;
}

.quick-item:nth-of-type(2) > .quick-icon {
  font-size: 22px;
}

.room-card[data-room] {
  cursor: pointer;
  position: relative;
}

.room-card[data-room]:focus-within {
  outline: 3px solid rgba(8, 116, 187, .35);
  outline-offset: 5px;
}

.room-card[data-room]::after {
  content: "คลิกเพื่อดูรายละเอียด";
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(5, 56, 94, .86);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.room-card[data-room]:hover::after,
.room-card[data-room]:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.room-details-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.room-details-button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sky);
  transition: transform .2s ease, background .2s ease;
}

.room-card:hover .room-details-button span {
  transform: translateX(3px);
  background: #d4f0fa;
}

body.dialog-open {
  overflow: hidden;
}

.room-dialog {
  width: min(940px, calc(100% - 30px));
  max-width: none;
  height: min(92dvh, 940px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  color: var(--ink);
  background: #f7fbfd;
  box-shadow: 0 32px 90px rgba(3, 39, 66, .35);
}

.room-dialog::backdrop {
  background: rgba(3, 31, 52, .72);
  backdrop-filter: blur(5px);
}

.room-dialog[open] {
  animation: dialog-in .24s ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.room-dialog-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.room-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, #fff, #e9f7fc);
}

.room-dialog-header p,
.room-dialog-header h2 {
  margin: 0;
}

.room-dialog-header p {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
}

.room-dialog-header h2 {
  color: var(--navy);
  font-size: 25px;
  line-height: 1.35;
}

.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0 0 4px;
  border: 1px solid #cfe2eb;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font: 300 32px/1 Arial, sans-serif;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.dialog-close:hover {
  color: #fff;
  background: var(--blue);
  transform: rotate(4deg);
}

.room-dialog-media {
  overflow: auto;
  overscroll-behavior: contain;
  background: #ecf5f8;
  scrollbar-color: #8fc9de #e1eff4;
}

.room-dialog-media img {
  width: min(100%, 820px);
  height: auto;
  margin: 0 auto;
  background: #fff;
}

.room-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.room-dialog-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.room-dialog-footer p span {
  color: var(--blue);
  margin-right: 5px;
}

.room-dialog-footer .button {
  flex: 0 0 auto;
  padding: 11px 17px;
  font-size: 12px;
}

@media (max-width: 680px) {
  .room-card[data-room]::after { display: none; }
  .room-dialog {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .room-dialog-header { padding: 15px 16px; }
  .room-dialog-header h2 { font-size: 21px; }
  .room-dialog-footer {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
  }
  .room-dialog-footer .button { width: 100%; }
}
