body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: #fefefe;
  background: #008080;
  width: 100vw;
  height: 100vh;
  text-align: center;
  position: relative;
  overflow-x: hidden;
}

.bg-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  /* filter: saturate(130%) contrast(120%) blur(1px); */
}

.bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.8s ease-in-out;
}

.bg-slide.active {
  opacity: 1;
  z-index: 2;
}

.bg-slide.transitioning {
  z-index: 3;
  opacity: 1;
}

@keyframes panBackground {
  0% {
    transform: scale(1.2) translate(0, 0);
  }

  50% {
    transform: scale(1.25) translate(-2%, -2%);
  }

  100% {
    transform: scale(1.2) translate(2%, 2%);
  }
}

body::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  background:
    url("/reserva-2n.png") no-repeat,
    url("/reserva-3n.png") no-repeat,
    url("/reserva-4n.png") no-repeat;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;

  background-image: linear-gradient(rgba(39, 43, 46, 0.6) 1px,
      transparent 1px);
  background-size: 100% 2px;

  /* animation: scanMove 10s linear infinite; */
}

.container {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto 1fr;
  gap: 10px 20px;
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
}

.desktop-icons {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.desktop-icons-bottom {
  margin-top: 5rem;
}

@media (max-width: 767px) {
  .desktop-icons-bottom {
    margin-top: 0;
  }
}

.desktop-icon {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  color: #fafafa;
  margin-top: 1rem;
  user-select: none;
}

.desktop-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.25rem;
}

.desktop-icon span {
  font-size: 14px;
}

.desktop-icon:hover {
  background: #000080;
  border: 1px dotted #ffffff;
}

.desktop-icon:hover span {
  color: #ffffff;
  background: #000080;
}

.desktop-icon.selected {
  background: #00008099;
  border: 1px dotted #ffffff;
}

.desktop-icon.selected span {
  color: #ffffff;
  background: #00008099;
}

.container>.window {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.window {
  width: 100%;
  max-width: 1080px;
  margin: 10px 0;
  background: #0417a88f;
  background-size: auto;
  background-blend-mode: luminosity;
  backdrop-filter: saturate(40%) contrast(80%) blur(2px);
  text-shadow: 2px 2px 3px #000000c7;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.window-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 1rem;
}

.controls-wrap {
  display: grid;
  grid-template-columns: 1fr 240px;
  grid-template-rows: auto auto;
  gap: 1rem;
  justify-content: center;
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 761px;
}

.controls-wrap fieldset {
  min-width: 0;
  margin: 0;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: rgba(23, 23, 23, .5);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 1.4em;
  color: #fafafa;
}

.controls-wrap fieldset label,
.controls-wrap fieldset legend {
  font-size: inherit;
  color: #a4aaff;
}

.controls-wrap fieldset legend {
  color: #fff;
  letter-spacing: 1px;
}

.controls-wrap fieldset:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.controls-wrap fieldset:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.controls-wrap fieldset:nth-child(3) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.controls-wrap fieldset:nth-child(4) {
  grid-column: 2;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
}

.controls-wrap fieldset:nth-child(5) {
  grid-column: 1;
  grid-row: 3 / span 2;
  background: none;
}

@media (max-width: 767px) {

  .clippy {
    display: none !important;
  }

  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .desktop-icons {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    justify-content: left;
  }

  .container>.window {
    grid-column: 1;
    grid-row: 2;
  }

  .window {
    width: 100%;
    max-width: 100%;
  }

  .controls-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0 auto 1rem;
    width: 100%;
    max-width: 100%;
  }

  .controls-wrap fieldset {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .guests_q_tabs button,
  .guests_h_tabs button,
  .guests_d_tabs button {
    flex: 1 1 45%;
  }

  .window-body .clippy-content {
    background-image: none !important;
    min-height: inherit !important;
    padding-left: 0 !important;
  }
}

.controls-wrap fieldset legend {
  margin-bottom: 0;
  padding-bottom: 0.25rem;
}

.guests_q_tabs,
.guests_h_tabs,
.guests_d_tabs {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin: 0;
  flex-wrap: wrap;
}

.guests_q_tabs button,
.guests_h_tabs button,
.guests_d_tabs button {
  flex: 0 1 auto;
  border: 2px solid #808080;
  background: #2e2e2e;
  color: #fafafa;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  transition: background 0.3s, transform 0.2s;
}

.guests_q_tabs button:hover,
.guests_h_tabs button:hover,
.guests_d_tabs button:hover {
  transform: translateY(-2px);
}

.guests_q_tabs button.selected {
  background-image: var(--selected-icon), linear-gradient(180deg, #6a11cb, #2575fc);
  background-repeat: no-repeat;
  background-size: auto;
  background-position: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7), 1px 1px 1px #000, 1px 1px 2px #000, 1px 1px 3px #000, 1px 1px 4px #000;
}



.guests_q_tabs button[data-q="2"] {
  --selected-icon: url('/reserva-2n.png');
}

.guests_q_tabs button[data-q="3"] {
  --selected-icon: url('/reserva-3n.png');
}

.guests_q_tabs button[data-q="4"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_q_tabs button[data-q="5"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_q_tabs button[data-q="6"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_q_tabs button[data-q="7"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_q_tabs button[data-q="8"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_q_tabs button[data-q="9"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_q_tabs button[data-q="10"] {
  --selected-icon: url('/reserva-4n.png');
}

.guests_h_tabs button.selected,
.guests_d_tabs button.selected {
  background: linear-gradient(180deg, #6a11cb, #2575fc);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.promo-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgb(0, 136, 0);
  color: #fff;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 10;
  pointer-events: none;
  /* animation: pulse 2s ease-in-out infinite; DISABLED - GPU test */
}

.promo-badge.emoji-overlap {
  letter-spacing: -0.3em;
}

.promo-badge.hidden {
  display: none;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.guests_h_tabs button {
  position: relative;
}

.guests_q_tabs button[data-q="2"]:hover,
.guests_q_tabs button[data-q="2"].selected {
  animation: swipeBottomBg 1.2s ease-out forwards;
}

.guests_q_tabs button[data-q="3"]:hover,
.guests_q_tabs button[data-q="3"].selected {
  animation: swipeLeftBg 1.2s ease-out forwards;
}

.guests_q_tabs button[data-q="4"]:hover,
.guests_q_tabs button[data-q="4"].selected {
  animation: swipeTopBg 1.2s ease-out forwards;
}

.guests_q_tabs button {
  background-position: 50% 50%;
}



#price-fieldset {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto 1fr auto;
  row-gap: 0.25rem;
  column-gap: 1rem;
  align-items: center;
  background: none;
}

#price-fieldset label {
  grid-column: 1;
  text-align: left;
  white-space: nowrap;
  align-self: start;
}

#price-fieldset span {
  grid-column: 2;
  text-align: right;
}

#price-fieldset label:last-of-type,
#price-fieldset span:last-of-type {
  font-weight: bold;
  margin-top: 10px;
}

#my-cal-inline {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

#my-cal-inline.loading {
  opacity: 0.5;
  pointer-events: none;
}

#my-cal-inline .loading-busy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
}

#my-cal-inline .loading-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  background: #6a11cb;
  width: 0;
  z-index: 1000;
  animation: progress 1s linear forwards;
}

#price-fieldset {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 0.25rem;
  column-gap: 1rem;
  align-items: center;
}

#promo-container {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 0.5rem 0;
  grid-column: 1 / -1;
  border: none;
  margin: 0;
  background: none;
  border-bottom: 1px dashed #aaa;
  border-radius: 0;
}

.promo-prompt {
  font-size: 0.85rem;
  color: #a9d2fd;
  cursor: pointer;
}

.promo-entry {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.promo-entry input {
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.promo-entry button {
  flex-shrink: 0;
  order: 2;
}

.promo-entry .cancel-btn {
  order: 3;
  margin-left: auto;
}

.promo-link:hover {
  text-decoration: underline;
}

.promo-message {
  display: none;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  font-size: 1rem;
}

.promo-message .clear-btn {
  margin-left: auto;
}

.promo-entry .cancel-btn,
.promo-message .clear-btn {
  cursor: pointer;
  font-size: 1.2rem;
  color: #333;
  line-height: 1;
}

.promo-message.success {
  color: #080;
}

.promo-message.error {
  color: #c00;
}

.promo-message.loading {
  color: #a9d2fd;
  font-style: italic;
}

#discount-value {
  color: #080;
  font-weight: bold;
}

#discount-value.full-width {
  grid-column: 1 / -1;
  text-align: left;
}

#my-cal-inline {
  display: none;
}

.controls-wrap>#action-button-container {
  grid-column: 2;
  justify-self: center;
  margin-top: 0;
}

#action-button-container {
  text-align: center;
  margin-top: 1rem;
}

#action-button {
  display: inline-block;
  position: relative;
  padding: 0.5rem 1.2rem;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 1rem;
  line-height: 2rem;
  color: #fafafa;
  background-image: linear-gradient(180deg, #6a11cb, #2575fc);
  border: 2px solid #808080;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #000;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s;
}

#action-button::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  background: url('/mp.svg') no-repeat center/contain;
  pointer-events: none;
}

#action-button:hover {
  transform: translateY(-2px);
}

#action-button {
  position: relative;
}

#action-button::after {
  content: "»";
  display: inline-block;
  margin-left: 0.3rem;
}

#action-button:hover::after {
  animation: arrow-step 0.9s steps(3) infinite;
}

.window-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.window-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.window-container .window-body {
  flex: 1;
  overflow-y: auto;
}

/* Mobile: full width but keep original height */
@media (max-width: 768px) {
  .window-container:not(.modal) {
    width: 95vw !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
}

.window-buttons {
  margin: 0.5em;
  text-align: right;
}

.window-buttons .button {
  margin-left: 0.5em;
}

.window-container.modal .window-buttons {
  display: flex;
  justify-content: center;
  padding-bottom: 0.5em;
}

.window-container.modal .window-buttons .accept-btn {
  margin: 0;
  font-size: 14px;
  padding: 7px 20px;
}

.window-container.modal {
  max-width: 400px;
}

.window-container.modal .window-body,
.window-container.modal .window-body p {
  padding-top: 0;
  font-size: 1rem;
}

.purchase-options .address-info {
  margin-bottom: 0.75em;
  text-align: left;
  color: #a4aaff;
  font-size: 1em;
}

.purchase-options label {
  margin-bottom: 0.5em;
  text-align: left;
  cursor: pointer;
}

.purchase-options input[type="checkbox"]:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
  color: #666;
}

.clippy {
  position: absolute !important;
  pointer-events: none !important;
}

.clippy,
.clippy-balloon {
  position: relative;
  cursor: default !important;
}

.clippy-balloon {
  opacity: .8;
  text-shadow: none;
}

#context-help .clippy-balloon.glow {
  outline: 3px solid transparent;
  outline-offset: 2px;
  animation: clippy-glow 2s ease-in-out forwards;
}

.window-body .clippy-top-left .clippy-tip {
  margin-left: -30%;
}

.window-body .clippy-balloon {
  max-width: inherit !important;
}

.window-body .clippy-tip {
  display: none;
}

.window-body .clippy-content {
  display: flex;
  align-items: center;
  max-width: none !important;
  background-image: url("https://raw.githubusercontent.com/React95/React95/refs/heads/master/packages/icons/src/icons/bulb.ico");
  background-repeat: no-repeat;
  background-position: left;
  min-height: 50px;
  padding-left: 35px;
}

img.floating-logo {
  border-radius: 50px;
  display: block;
  margin: 10px auto;
  animation: levitate 3s steps(4, end) infinite;
}

.guests_h_tabs button:disabled,
.guests_h_tabs button[disabled],
.guests_h_tabs button.retrocumple-disabled,
.guests_q_tabs button:disabled,
.guests_q_tabs button[disabled],
.guests_q_tabs button.retrocumple-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #1a1a1a !important;
  color: #666 !important;
  pointer-events: none;
  transform: none !important;
  filter: grayscale(80%) brightness(0.7);
}

.edit-guests-btn {
  min-width: 28px !important;
  padding: 0.5rem !important;
  font-weight: bold;
  margin-left: -2px !important;
  border-left: none !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.editable-btn {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.edit-guests-btn.confirm {
  background: #000 !important;
}

.editable-btn.editing {
  background: #000 !important;
  color: #fff !important;
  cursor: text !important;
}

.editable-btn.editing:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff;
}

.editable-btn .edit-input {
  font-size: 1em;
  border: none;
  background: transparent;
  color: #fff;
  text-align: center;
  outline: none;
  width: 3em;
  margin-left: 0.5em;
}

.editable-btn.editing .editable-label {
  display: none;
}

.editable-btn.editing .edit-input {
  display: inline-block;
  background: #000;
  border-radius: 3px;
  color: #fff;
}

.guests_q_tabs:has(.edit-guests-btn.selected) .editable-btn {
  background-image: var(--selected-icon), linear-gradient(180deg, #6a11cb, #2575fc);
  background-repeat: no-repeat;
  background-size: auto;
  background-position: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7), 1px 1px 1px #000, 1px 1px 2px #000, 1px 1px 3px #000, 1px 1px 4px #000;
}

.window.modal, .window.modal .title-bar, .window.modal button, .window.modal code {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
@media print {    
    .no-print, .no-print * {
        display: none !important;
    }
}

/* Window control buttons - global styling */
.window-minimize:disabled,
.window-maximize:disabled,
.window-close:disabled {
  opacity: 0.5;
  filter: grayscale(100%);
  pointer-events: none;
}

.window-minimize:disabled:hover,
.window-maximize:disabled:hover,
.window-close:disabled:hover {
  background: inherit;
}


/* Maximized window state - matches main window position */
.window-container.maximized {
  position: fixed;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 95% !important;
  max-width: 1080px !important;
  height: calc(100vh - 20px) !important;
  z-index: 2000;
}

.window-container.maximized .window-body {
  flex: 1;
  overflow: auto;
}

/* Make content fill maximized window */
.window-container.maximized .photos-image-viewer,
.window-container.maximized .photos-folder-view,
.window-container.maximized .video-player-container {
  height: 100%;
}

.window-container.maximized .photos-image-display {
  height: calc(100% - 40px);
}

.window-container.maximized .photos-image-display img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.window-container.maximized .photos-grid {
  justify-content: flex-start;
}


/* Inactive window state - grayed out when another window is on top */
.window.inactive {
  filter: brightness(0.7) saturate(0.5);
  pointer-events: none;
}

.window.inactive .title-bar {
  filter: grayscale(0.5);
}

.window-container.inactive {
  filter: brightness(0.7) saturate(0.5);
  pointer-events: none;
}

.window-container.inactive .title-bar {
  filter: grayscale(0.5);
}


/* Konami mode - Easter egg */
.konami-mode .guests_q_tabs button {
  --selected-icon: url('/img/Drvspace7_32x32_4.png') !important;
}

.konami-mode .window-body .clippy-content {
  background-image: url('/img/Drvspace7_32x32_4.png') !important;
}


/* Title bar text ellipsis */
.title-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 70px);
  user-select: none;
}

.title-bar {
  user-select: none;
  cursor: default;
}


/* Desktop icon badge */
.desktop-icon {
  position: relative;
}

.desktop-badge {
  position: absolute;
  top: 0;
  right: -5px;
  background: #ff0000;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px !important;
  font-weight: bold;
  padding: 1px 3px;
  border-radius: 3px;
  text-shadow: none;
}

.desktop-icon:hover .desktop-badge,
.desktop-icon.selected .desktop-badge {
  background: #ff0000;
}

/* External link shortcut icon */
.desktop-icon a[target="_blank"] {
  position: relative;
  display: inline-block;
}

.desktop-icon a[target="_blank"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 32px;
  background: url('/img/shortcut-32x32.png') no-repeat;
  background-size: contain;
  pointer-events: none;
}
