/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --nyx-primary:   #2A5C43;
  --nyx-secondary: #f7f9f8;
  --nyx-accent:    #E65C4F;
  --nyx-text:      #1a2f26;
  --nyx-border:    rgba(42,92,67,.15);
  --nyx-radius:    14px;
  --nyx-shadow:    0 4px 24px rgba(42,92,67,.09);
}

/* ── Reset ─────────────────────────────────────────────────────── */
.nyx-rooms-app *, .nyx-rooms-app *::before, .nyx-rooms-app *::after {
  box-sizing: border-box;
}

.nyx-rooms-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--nyx-text);
  line-height: 1.5;
}

/* ── Loading ───────────────────────────────────────────────────── */
.nyx-rooms-loading {
  padding: 2rem;
  text-align: center;
  color: rgba(26,47,38,.5);
  font-size: .9rem;
}

/* ── Grid camere ───────────────────────────────────────────────── */
.nyx-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.nyx-room-card {
  border: 1px solid var(--nyx-border);
  border-radius: var(--nyx-radius);
  background: #fff;
  box-shadow: var(--nyx-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.nyx-room-card:hover {
  box-shadow: 0 8px 32px rgba(42,92,67,.16);
  transform: translateY(-2px);
}

.nyx-room-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--nyx-secondary);
  display: block;
}
.nyx-room-image-placeholder {
  width: 100%;
  height: 200px;
  background: var(--nyx-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(26,47,38,.3);
  font-size: 2.5rem;
}

.nyx-room-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.nyx-room-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--nyx-text);
  margin: 0;
}

.nyx-room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(26,47,38,.65);
}
.nyx-room-meta-chip {
  background: var(--nyx-secondary);
  border: 1px solid var(--nyx-border);
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
}

.nyx-room-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nyx-primary);
}
.nyx-room-price span {
  font-size: .8rem;
  font-weight: 400;
  color: rgba(26,47,38,.55);
}

.nyx-room-desc {
  font-size: .85rem;
  color: rgba(26,47,38,.7);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.nyx-room-services {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  font-size: .75rem;
}
.nyx-service-tag {
  background: rgba(42,92,67,.08);
  color: var(--nyx-primary);
  border-radius: 4px;
  padding: 2px 8px;
}

.nyx-btn {
  margin-top: auto;
  padding: .75rem 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: background .2s, opacity .2s;
  text-align: center;
  display: block;
  width: 100%;
}
.nyx-btn-primary {
  background: var(--nyx-primary);
  color: #fff;
}
.nyx-btn-primary:hover { background: #1e4233; }
.nyx-btn-secondary {
  background: transparent;
  color: var(--nyx-primary);
  border: 1.5px solid var(--nyx-primary);
}
.nyx-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Modal ─────────────────────────────────────────────────────── */
.nyx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.nyx-modal {
  background: #fff;
  border-radius: var(--nyx-radius);
  box-shadow: 0 16px 64px rgba(0,0,0,.18);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
}
.nyx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--nyx-border);
  position: sticky;
  top: 0;
  background: #fff;
}
.nyx-modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.nyx-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: rgba(26,47,38,.5);
  line-height: 1;
  padding: 4px;
}
.nyx-modal-body {
  padding: 1.5rem;
}

/* ── Steps ─────────────────────────────────────────────────────── */
.nyx-steps {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.nyx-step {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--nyx-border);
  transition: background .3s;
}
.nyx-step.active { background: var(--nyx-primary); }
.nyx-step.done   { background: rgba(42,92,67,.4); }

/* ── Calendario ────────────────────────────────────────────────── */
.nyx-calendar {
  border: 1px solid var(--nyx-border);
  border-radius: 10px;
  overflow: hidden;
}
.nyx-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--nyx-secondary);
  font-weight: 600;
  font-size: .9rem;
}
.nyx-cal-nav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--nyx-primary);
  padding: 2px 6px;
}
.nyx-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: .5rem;
}
.nyx-cal-day-name {
  text-align: center;
  font-size: .7rem;
  font-weight: 600;
  color: rgba(26,47,38,.5);
  padding: 4px 0;
}
.nyx-cal-day {
  text-align: center;
  padding: 6px 2px;
  border-radius: 6px;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.nyx-cal-day:hover:not(.blocked):not(.empty) { background: rgba(42,92,67,.1); }
.nyx-cal-day.empty { pointer-events: none; }
.nyx-cal-day.blocked { color: rgba(26,47,38,.3); text-decoration: line-through; pointer-events: none; cursor: not-allowed; }
.nyx-cal-day.selected-start, .nyx-cal-day.selected-end { background: var(--nyx-primary); color: #fff; font-weight: 700; }
.nyx-cal-day.in-range { background: rgba(42,92,67,.12); }
.nyx-cal-day.past { color: rgba(26,47,38,.3); pointer-events: none; }

/* ── Form ──────────────────────────────────────────────────────── */
.nyx-form-group {
  margin-bottom: 1rem;
}
.nyx-form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--nyx-text);
}
.nyx-form-group label .req { color: var(--nyx-accent); margin-left: 2px; }
.nyx-form-group input,
.nyx-form-group textarea,
.nyx-form-group select {
  width: 100%;
  border: 1.5px solid var(--nyx-border);
  border-radius: 9px;
  padding: .65rem .85rem;
  font-size: .9rem;
  color: var(--nyx-text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.nyx-form-group input:focus,
.nyx-form-group textarea:focus,
.nyx-form-group select:focus {
  border-color: var(--nyx-primary);
  box-shadow: 0 0 0 3px rgba(42,92,67,.1);
}
.nyx-form-group textarea { resize: vertical; min-height: 80px; }

.nyx-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .nyx-form-grid-2 { grid-template-columns: 1fr; } }

/* ── Alert ─────────────────────────────────────────────────────── */
.nyx-alert {
  border-radius: 9px;
  padding: .75rem 1rem;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.nyx-alert-error { background: rgba(230,92,79,.1); border: 1px solid rgba(230,92,79,.35); color: #8b2e26; }
.nyx-alert-success { background: rgba(42,92,67,.1); border: 1px solid rgba(42,92,67,.35); color: #1a4030; }

/* ── FAQ ───────────────────────────────────────────────────────── */
.nyx-faq { margin-top: 1.5rem; border-top: 1px solid var(--nyx-border); padding-top: 1.25rem; }
.nyx-faq-item { margin-bottom: .75rem; }
.nyx-faq-q { font-weight: 600; font-size: .88rem; cursor: pointer; display: flex; justify-content: space-between; }
.nyx-faq-a { font-size: .84rem; color: rgba(26,47,38,.7); margin-top: .4rem; padding-left: .5rem; display: none; }
.nyx-faq-item.open .nyx-faq-a { display: block; }

/* ── Riepilogo ─────────────────────────────────────────────────── */
.nyx-summary-box {
  background: var(--nyx-secondary);
  border: 1px solid var(--nyx-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: .88rem;
  margin-bottom: 1.5rem;
}
.nyx-summary-row { display: flex; justify-content: space-between; padding: 4px 0; }
.nyx-summary-row.total { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--nyx-border); margin-top: 6px; padding-top: 8px; }

/* ── Calendar instruction hint ─────────────────────────────────── */
.nyx-cal-instruction {
  font-size: .83rem;
  color: rgba(26,47,38,.6);
  background: rgba(42,92,67,.06);
  border-radius: 8px;
  padding: .45rem .85rem;
  margin: 0 0 .75rem;
  text-align: center;
}
.nyx-cal-instruction--end {
  background: rgba(42,92,67,.11);
  color: var(--nyx-primary);
}

/* ── Calendar hover preview ─────────────────────────────────────── */
.nyx-cal-day.nyx-hover-range {
  background: rgba(42,92,67,.08);
}
.nyx-cal-day.nyx-hover-end {
  background: rgba(42,92,67,.22);
  border-radius: 6px;
  color: var(--nyx-primary);
  font-weight: 700;
}

/* ── Date summary chips ─────────────────────────────────────────── */
.nyx-date-summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--nyx-secondary);
  border: 1px solid var(--nyx-border);
  border-radius: 10px;
  padding: .7rem 1rem;
  margin-top: .9rem;
  flex-wrap: wrap;
}
.nyx-date-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nyx-date-chip__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(26,47,38,.45);
}
.nyx-date-chip strong {
  font-size: .88rem;
  color: var(--nyx-text);
}
.nyx-date-chip__arrow {
  color: rgba(26,47,38,.35);
  font-size: 1rem;
  align-self: center;
}
.nyx-date-chip__nights {
  margin-left: auto;
  background: rgba(42,92,67,.1);
  color: var(--nyx-primary);
  font-size: .75rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  align-self: center;
}

/* ── Inline booking (hero modal embed — no nested overlay) ──────── */
.nyx-inline-booking {
  padding: .25rem 0;
}
.nyx-inline-booking__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--nyx-border);
  flex-wrap: wrap;
}
.nyx-inline-back {
  background: none;
  border: 1.5px solid var(--nyx-border);
  border-radius: 8px;
  padding: .4rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--nyx-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
  font-family: inherit;
}
.nyx-inline-back:hover {
  background: rgba(42,92,67,.06);
  border-color: var(--nyx-primary);
}
.nyx-inline-booking__room-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.nyx-inline-booking__room-info strong {
  font-size: .95rem;
  color: var(--nyx-text);
}
.nyx-inline-price {
  font-size: .82rem;
  color: var(--nyx-primary);
  font-weight: 600;
  background: rgba(42,92,67,.08);
  border-radius: 20px;
  padding: 2px 10px;
}
