/* ============================================================
   Institution detail page — modern redesign
   Sits on top of ProductDetail/details.css and overrides the
   product-detail classes (.mainImage, .thumbnails, .posted…)
   that this page reuses. Fully dark-mode aware.
   ============================================================ */

:root {
  --inst-accent: var(--brand-orange-500, var(--brand-orange-500));
  --inst-accent-2: var(--brand-orange-300, #ff9d2e);
  --inst-accent-contrast: var(--white);
  --inst-ink: var(--brand-navy-700, var(--brand-navy-700));
  --inst-text: #33475c;
  --inst-muted: #7b90a5;
  --inst-card: var(--white);
  --inst-border: rgba(13, 43, 66, 0.1);
  --inst-soft: rgba(13, 43, 66, 0.05);
  --inst-shadow: 0 10px 26px rgba(2, 42, 70, 0.1);
  --inst-shadow-lg: 0 22px 44px rgba(2, 42, 70, 0.16);
}

[data-theme="dark"] {
  --inst-ink: #eef4fb;
  --inst-text: #c3d2e3;
  --inst-muted: #8fa3ba;
  --inst-card: #141d30;
  --inst-border: rgba(148, 170, 199, 0.16);
  --inst-soft: rgba(148, 170, 199, 0.08);
  --inst-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --inst-shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.inst-page {
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(255, 122, 0, 0.07), transparent 60%),
    radial-gradient(800px 420px at 92% 4%, rgba(47, 128, 237, 0.08), transparent 60%);
  min-height: 100vh;
}

.inst-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

/* ===================== HERO ===================== */
.inst-hero {
  padding: 24px 0 8px;
}

.inst-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  gap: 32px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

/* Flex column children must be allowed to shrink so a wide grid track
   (e.g. minmax(380px, .88fr)) cannot push the whole page sideways. */
.inst-hero,
.inst-hero-grid,
.inst-gallery,
.inst-panel,
.inst-rooms,
.inst-rooms-grid,
.inst-similar,
.inst-sim-grid {
  min-width: 0;
}

/* ---------- Gallery ---------- */
.inst-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Override ProductDetail/details.css .mainImage */
.inst-hero-img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  min-height: 320px;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--inst-shadow-lg);
}

.inst-hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 16, 30, 0) 55%, rgba(4, 16, 30, 0.5));
  pointer-events: none;
}

.inst-hero-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.inst-hero-img:hover img {
  transform: scale(1.05);
}

.inst-type-ribbon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
  background: linear-gradient(135deg, rgba(4, 16, 30, 0.72), rgba(4, 16, 30, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  text-transform: capitalize;
}

/* Per-type ribbon tints (class added by institutionDetail.js) */
.inst-type-ribbon.t-hotel { border-color: rgba(96, 165, 250, 0.6); }
.inst-type-ribbon.t-school { border-color: rgba(52, 211, 153, 0.6); }
.inst-type-ribbon.t-restaurant { border-color: rgba(251, 146, 60, 0.6); }
.inst-type-ribbon.t-clinic { border-color: rgba(244, 114, 182, 0.6); }
.inst-type-ribbon.t-gym { border-color: rgba(251, 191, 36, 0.65); }
.inst-type-ribbon.t-salon { border-color: rgba(217, 70, 239, 0.6); }
.inst-type-ribbon.t-other { border-color: rgba(167, 139, 250, 0.6); }

/* Override details.css .thumbnails */
.inst-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  overflow: visible;
}

.inst-thumbs .thumbnail {
  width: 100%;
  height: 78px;
  border: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--inst-soft);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.inst-thumbs .thumbnail.active {
  border-color: var(--inst-accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
}

.inst-thumbs .thumbnail:hover {
  transform: translateY(-2px);
}

.inst-thumbs .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Info panel ---------- */
.inst-panel {
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 22px;
  padding: 24px 24px 18px;
  box-shadow: var(--inst-shadow);
}

.inst-panel-top h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--inst-ink);
  margin: 0;
  line-height: 1.18;
  font-weight: 800;
}

.inst-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.inst-rating-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

[data-theme="dark"] .inst-rating-line {
  color: #fbbf24;
}

.inst-rating-line b {
  color: #92400e;
}

[data-theme="dark"] .inst-rating-line b {
  color: #fde68a;
}

.inst-rating-line svg {
  color: #f59e0b;
}

.inst-loc {
  margin: 8px 0 0;
  color: var(--inst-muted);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inst-loc svg {
  color: var(--inst-accent);
  flex-shrink: 0;
}

/* ---------- Facts ---------- */
.inst-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.inst-fact {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--inst-soft);
  border: 1px solid var(--inst-border);
  border-radius: 14px;
  color: var(--inst-text);
  font-size: 0.86rem;
  min-width: 0;
}

.inst-fact b {
  color: var(--inst-ink);
}

.inst-fact-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.16), rgba(255, 157, 46, 0.1));
  color: var(--inst-accent);
}

.inst-fact > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- About ---------- */
.inst-about {
  margin-top: 16px;
  padding: 15px 17px;
  background: var(--inst-soft);
  border: 1px solid var(--inst-border);
  border-left: 3px solid var(--inst-accent);
  border-radius: 14px;
  color: var(--inst-text);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ---------- Amenities ---------- */
.inst-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.inst-amen-title {
  width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--inst-muted);
}

.inst-amen-chip {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 127, 17, 0.09);
  border: 1px solid rgba(255, 127, 17, 0.28);
  color: #b45309;
  font-size: 0.8rem;
  font-weight: 600;
}

[data-theme="dark"] .inst-amen-chip {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.1);
}

.inst-amen-none {
  color: var(--inst-muted);
  font-size: 0.85rem;
}

/* ---------- Active promo banner ---------- */
.inst-promo-banner {
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 45, 85, 0.08));
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.inst-promo-banner[hidden] {
  display: none;
}
.inst-promo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b6b, #ff2d55);
  color: var(--white);
  flex-shrink: 0;
}
.inst-promo-body {
  flex: 1;
  min-width: 0;
}
.inst-promo-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #c41c22;
  margin-bottom: 2px;
}
.inst-promo-desc {
  font-size: 0.82rem;
  color: #6b4c5a;
  line-height: 1.4;
}
.inst-promo-code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-navy-700, var(--brand-navy-700));
  background: var(--white);
  border: 1px dashed #c8d6e5;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.inst-promo-code:hover {
  border-color: #ff6b6b;
}
.inst-promo-code .copy-ic {
  font-size: 0.65rem;
}
.inst-promo-exp {
  font-size: 0.7rem;
  color: #9a7a8a;
  margin-top: 3px;
}
@media (max-width: 640px) {
  .inst-promo-banner {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 12px;
  }
  .inst-promo-icon {
    width: 34px;
    height: 34px;
  }
  .inst-promo-label {
    font-size: 0.85rem;
  }
}

/* ---------- CTA bar ---------- */
.inst-cta {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  position: sticky;
  bottom: 14px;
  z-index: 6;
  padding: 10px;
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 18px;
  box-shadow: var(--inst-shadow-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.inst-cta-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 20px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--inst-accent), var(--inst-accent-2));
  color: var(--inst-accent-contrast);
  font: 700 0.98rem/1 "Poppins", "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 122, 0, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.inst-cta-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(255, 122, 0, 0.42);
}

.inst-cta-primary:active {
  transform: translateY(0);
}

.inst-cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 15px 18px;
  border-radius: 13px;
  border: 1.5px solid var(--inst-border);
  background: transparent;
  color: var(--inst-text);
  font: 600 0.9rem/1 "Poppins", sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.inst-cta-ghost:hover {
  border-color: var(--danger-600, var(--danger-600));
  color: var(--danger-600, var(--danger-600));
  background: rgba(220, 38, 38, 0.06);
}

/* ---------- Directions ---------- */
.posted-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inst-directions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 138, 43, 0.35);
  background: rgba(255, 138, 43, 0.1);
  color: var(--inst-accent, #ff8a2b);
  font: 700 0.78rem/1 "Poppins", sans-serif;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.inst-directions:hover {
  background: rgba(255, 138, 43, 0.2);
  border-color: var(--inst-accent, #ff8a2b);
}
.inst-directions[hidden] {
  display: none;
}

/* ---------- Posted row ---------- */
.posted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--inst-border);
  color: var(--inst-muted);
  font-size: 0.8rem;
}

.posted > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.posted button {
  border: 0;
  background: none;
  color: var(--inst-accent);
  font: 600 0.82rem/1 "Poppins", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.posted button:hover {
  background: var(--inst-soft);
}

/* ===================== SECTIONS ===================== */
.inst-section-head {
  max-width: 1392px;
  margin: 0 auto 22px;
  padding: 0 4px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.inst-section-head h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  color: var(--inst-ink);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.inst-section-head h2 svg {
  color: var(--inst-accent);
}

.inst-section-sub {
  color: var(--inst-muted);
  font-size: 0.9rem;
}

.inst-rooms {
  padding: 38px 0 6px;
  scroll-margin-top: 90px;
}

/* ===================== ROOMS / PLANS GRID ===================== */
.inst-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
  max-width: 1392px;
  margin: 0 auto;
}

.inst-room {
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--inst-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
}

.inst-room:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 0, 0.55);
  box-shadow: var(--inst-shadow-lg);
}

.inst-room-img {
  position: relative;
  height: 190px;
  background: var(--inst-soft);
  overflow: hidden;
}

.inst-room-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.inst-room:hover .inst-room-img img {
  transform: scale(1.07);
}

.inst-room-price-float {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(4, 16, 30, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-weight: 800;
  font-size: 0.92rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.inst-room-price-float small {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.82;
}

.inst-room-body {
  padding: 18px 19px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.inst-room-top h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--inst-ink);
}

.inst-room-desc {
  color: var(--inst-text);
  font-size: 0.87rem;
  line-height: 1.58;
  margin: 8px 0 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inst-room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
}

.inst-room-meta span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--inst-text);
  background: var(--inst-soft);
  border: 1px solid var(--inst-border);
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.inst-room-meta span svg {
  color: var(--inst-accent);
}

.inst-room-ams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.inst-room-ams span {
  font-size: 0.73rem;
  font-weight: 600;
  color: #b45309;
  background: rgba(255, 127, 17, 0.08);
  border: 1px solid rgba(255, 127, 17, 0.26);
  padding: 4px 9px;
  border-radius: 999px;
}

[data-theme="dark"] .inst-room-ams span {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.inst-book-btn {
  margin-top: auto;
  padding: 13px 16px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--inst-accent), var(--inst-accent-2));
  color: var(--white);
  font: 700 0.95rem/1 "Poppins", "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 122, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.inst-book-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 26px rgba(255, 122, 0, 0.4);
}

.inst-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--inst-muted);
  background: var(--inst-soft);
  border: 1px dashed var(--inst-border);
  border-radius: 16px;
  padding: 34px 20px;
  font-size: 0.93rem;
}

/* ===================== REVIEWS ===================== */
.inst-reviews {
  padding: 38px 0 6px;
}

.inst-review-list {
  max-width: 1392px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.inst-review {
  display: flex;
  gap: 13px;
  padding: 17px;
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 16px;
  box-shadow: var(--inst-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.inst-review:hover {
  transform: translateY(-3px);
  box-shadow: var(--inst-shadow-lg);
}

.inst-review-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--inst-accent), var(--inst-accent-2));
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.inst-review-body {
  min-width: 0;
}

.inst-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inst-review-head b {
  color: var(--inst-ink);
  font-size: 0.92rem;
}

.inst-review-stars {
  color: #f59e0b;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.inst-review-date {
  margin-left: auto;
  color: var(--inst-muted);
  font-size: 0.74rem;
}

.inst-review-body p {
  margin: 8px 0 0;
  color: var(--inst-text);
  font-size: 0.88rem;
  line-height: 1.58;
}

/* Review form */
.inst-review-form {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 20px;
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 18px;
  box-shadow: var(--inst-shadow);
}

.inst-review-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 13px 15px;
  border: 1.5px solid var(--inst-border);
  border-radius: 13px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--inst-text);
  background: var(--inst-card);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inst-review-form textarea:focus {
  outline: none;
  border-color: var(--inst-accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.inst-review-form-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.inst-review-form select {
  padding: 12px 15px;
  border-radius: 13px;
  border: 1.5px solid var(--inst-border);
  background: var(--inst-card);
  font: 600 0.9rem/1 "Poppins", sans-serif;
  color: var(--inst-ink);
  cursor: pointer;
}

.inst-review-form button {
  flex: 1;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--inst-accent), var(--inst-accent-2));
  color: var(--white);
  font: 700 0.95rem/1 "Poppins", sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 18px rgba(255, 122, 0, 0.25);
}

.inst-review-form button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ===================== OWNER ===================== */
.inst-owner {
  padding: 38px 0 6px;
}

.inst-owner-card {
  max-width: 1392px;
  margin: 0 auto;
  padding: 26px;
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 22px;
  box-shadow: var(--inst-shadow);
}

.inst-owner-head {
  display: flex;
  gap: 17px;
  align-items: center;
}

.inst-owner-avatar img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--inst-accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.16);
}

.inst-owner-id {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inst-owner-id .uname {
  color: var(--inst-ink);
  font-weight: 700;
  font-size: 1.05rem;
}

.owner-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #0d9e63;
  font-size: 0.78rem;
  font-weight: 700;
}

.owner-verified.hidden {
  display: none;
}

.owner-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.owner-stars {
  position: relative;
  display: inline-flex;
  color: rgba(148, 170, 199, 0.35);
  font-size: 0.8rem;
}

.owner-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: #f59e0b;
  white-space: nowrap;
  width: 0%;
  transition: width 0.6s ease;
}

.owner-rating-text {
  color: var(--inst-muted);
  font-size: 0.82rem;
}

.joined {
  color: var(--inst-muted);
  font-size: 0.78rem;
}

.caution {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 15px;
}

.caution-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #b45309;
  font-weight: 700;
  font-size: 0.9rem;
}

[data-theme="dark"] .caution-title {
  color: #fbbf24;
}

.caution ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--inst-text);
  font-size: 0.85rem;
  line-height: 1.55;
}

.owner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.owner-action {
  padding: 11px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--inst-border);
  background: var(--inst-soft);
  color: var(--inst-ink);
  font: 600 0.86rem/1 "Poppins", sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.owner-action a {
  color: inherit;
  text-decoration: none;
}

.owner-action:hover {
  border-color: var(--inst-accent);
  color: var(--inst-accent);
}

.owner-action.danger:hover {
  border-color: var(--danger-600, var(--danger-600));
  color: var(--danger-600, var(--danger-600));
  background: rgba(220, 38, 38, 0.06);
}

.owner-action.danger-alt:hover {
  border-color: #b45309;
  color: #b45309;
  background: rgba(180, 83, 9, 0.06);
}

/* ===================== SIMILAR ===================== */
.inst-similar {
  padding: 38px 0 70px;
}

.inst-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  max-width: 1392px;
  margin: 0 auto;
}

.inst-sim-card {
  display: block;
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--inst-shadow);
  text-decoration: none;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.inst-sim-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 122, 0, 0.55);
  box-shadow: var(--inst-shadow-lg);
}

.inst-sim-img {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: var(--inst-soft);
}

.inst-sim-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.inst-sim-card:hover .inst-sim-img img {
  transform: scale(1.08);
}

.inst-sim-chips {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inst-sim-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  background: rgba(4, 16, 30, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.inst-sim-body {
  padding: 13px 15px 15px;
}

.inst-sim-body h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: var(--inst-ink);
}

.inst-sim-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.inst-sim-price {
  color: var(--inst-accent);
  font-weight: 800;
  font-size: 0.9rem;
}

.inst-sim-meta {
  color: var(--inst-muted);
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ===================== MODALS ===================== */
.inst-modal-backdrop[hidden] {
  display: none !important;
}

.inst-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(4, 16, 30, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: instFade 0.22s ease;
}

@keyframes instFade {
  from {
    opacity: 0;
  }
}

.inst-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  animation: instPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes instPop {
  from {
    transform: translateY(16px) scale(0.97);
    opacity: 0;
  }
}

.inst-modal h3 {
  margin: 0 0 6px;
  color: var(--inst-ink);
  font-size: 1.3rem;
}

.inst-modal-sub {
  margin: 0 0 18px;
  color: var(--inst-muted);
  font-size: 0.88rem;
}

.inst-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--inst-soft);
  color: var(--inst-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.inst-modal-close:hover {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger-600, var(--danger-600));
  transform: rotate(90deg);
}

.inst-book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.inst-book-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inst-book-field > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--inst-muted);
}

.inst-book-field input,
.inst-book-field select,
.inst-modal textarea {
  padding: 11px 13px;
  border: 1.5px solid var(--inst-border);
  border-radius: 13px;
  font: 500 0.9rem/1.3 "Poppins", sans-serif;
  color: var(--inst-ink);
  background: var(--inst-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inst-book-field input:focus,
.inst-book-field select:focus,
.inst-modal textarea:focus {
  outline: none;
  border-color: var(--inst-accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.inst-modal textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  box-sizing: border-box;
}

.inst-book-promo {
  margin: 10px 0;
}
.inst-book-promo .inst-book-field {
  margin: 0;
}
.inst-book-promo-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.inst-book-promo-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--inst-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--inst-card);
  color: var(--inst-text);
}
.inst-book-promo-row input:focus {
  outline: none;
  border-color: var(--inst-accent);
}
.inst-book-promo-btn {
  padding: 8px 14px;
  border: 1px solid var(--inst-accent);
  border-radius: 8px;
  background: transparent;
  color: var(--inst-accent);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.inst-book-promo-btn:hover {
  background: var(--inst-accent);
  color: var(--white);
}
.inst-book-promo-msg {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}
.inst-book-promo-msg[hidden] {
  display: none;
}
.inst-book-promo-msg.success {
  background: rgba(31, 191, 117, 0.1);
  color: #0d9e63;
  border: 1px solid rgba(31, 191, 117, 0.3);
}
.inst-book-promo-msg.error {
  background: rgba(229, 72, 77, 0.1);
  color: var(--danger-600, var(--danger-600));
  border: 1px solid rgba(229, 72, 77, 0.3);
}

.inst-book-total {
  margin: 14px 0 4px;
  color: var(--inst-muted);
  font-size: 0.92rem;
}

.inst-book-total b {
  color: var(--inst-accent);
  font-size: 1.05rem;
}

.inst-book-err {
  color: var(--danger-600, var(--danger-600));
  font-size: 0.85rem;
}

.inst-book-submit {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--inst-accent), var(--inst-accent-2));
  color: var(--white);
  font: 700 1rem/1 "Poppins", sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 122, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.inst-book-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(255, 122, 0, 0.4);
}

.inst-book-submit.danger {
  background: linear-gradient(135deg, var(--danger-600, var(--danger-600)), #ef4444);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.3);
}

.inst-book-submit.danger:hover {
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.42);
}

.inst-book-note {
  margin: 12px 0 0;
  color: var(--inst-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .inst-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .inst-hero-img {
    aspect-ratio: 16 / 9;
    min-height: 260px;
  }
  .inst-cta {
    position: static;
  }
}

/* ===================== AVAILABILITY CALENDAR ===================== */
.inst-modal-wide {
  width: min(420px, 100%);
}

.inst-avail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}

.inst-avail-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--danger-600, var(--danger-600));
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
}

.inst-avail-hint.free {
  color: #0d9e63;
  background: rgba(31, 191, 117, 0.08);
  border-color: rgba(31, 191, 117, 0.28);
}

[data-theme="dark"] .inst-avail-hint {
  color: #f87171;
}

[data-theme="dark"] .inst-avail-hint.free {
  color: #34d399;
}

.inst-avail-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--inst-border);
  background: var(--inst-soft);
  color: var(--inst-text);
  font: 600 0.8rem/1 "Poppins", sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.inst-avail-btn:hover {
  border-color: var(--inst-accent);
  color: var(--inst-accent);
}

.inst-cal {
  background: var(--inst-soft);
  border: 1px solid var(--inst-border);
  border-radius: 16px;
  padding: 14px;
}

.inst-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inst-cal-title {
  font-weight: 700;
  color: var(--inst-ink);
  font-size: 0.95rem;
}

.inst-cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--inst-border);
  background: var(--inst-card);
  color: var(--inst-text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inst-cal-nav:hover {
  border-color: var(--inst-accent);
  color: var(--inst-accent);
}

.inst-cal-dow,
.inst-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.inst-cal-dow span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--inst-muted);
  padding: 4px 0;
}

.inst-cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--inst-text);
  background: var(--inst-card);
  border: 1px solid var(--inst-border);
}

.inst-cal-day.empty {
  background: transparent;
  border-color: transparent;
}

.inst-cal-day.past {
  opacity: 0.38;
}

.inst-cal-day.today {
  box-shadow: inset 0 0 0 2px var(--inst-accent);
  color: var(--inst-accent);
}

.inst-cal-day.booked {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.55);
  color: var(--danger-600, var(--danger-600));
}

.inst-cal-day.requested {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.55);
  color: #b45309;
}

.inst-cal-day.blocked {
  background: rgba(100, 116, 139, 0.18);
  border-color: rgba(100, 116, 139, 0.6);
  color: var(--neutral-600, var(--neutral-600));
  text-decoration: line-through;
}

[data-theme="dark"] .inst-cal-day.booked {
  color: #f87171;
}

[data-theme="dark"] .inst-cal-day.requested {
  color: #fbbf24;
}

[data-theme="dark"] .inst-cal-day.blocked {
  color: #a5b4c8;
}

.inst-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.inst-cal-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--inst-muted);
}

.inst-cal-key i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  border: 1px solid var(--inst-border);
  background: var(--inst-card);
}

.inst-cal-key.booked i {
  background: rgba(220, 38, 38, 0.55);
  border-color: var(--danger-600, var(--danger-600));
}

.inst-cal-key.requested i {
  background: rgba(245, 158, 11, 0.55);
  border-color: #f59e0b;
}

.inst-cal-key.blocked i {
  background: rgba(100, 116, 139, 0.6);
  border-color: var(--neutral-500, var(--neutral-500));
}

@media (max-width: 620px) {
  .inst-main {
    padding: 0 14px 14px;
  }
  .inst-facts {
    grid-template-columns: 1fr 1fr;
  }
  .inst-fact {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .inst-cta {
    flex-direction: column;
  }
  .inst-cta-ghost {
    width: 100%;
  }
  .inst-book-grid {
    grid-template-columns: 1fr;
  }
  .inst-owner-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .inst-review-form-row {
    flex-direction: column;
  }
  .inst-rooms-grid,
  .inst-review-list,
  .inst-sim-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Offering badges (deposit / discount / cancellation) --- */
.inst-room-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.inst-room-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.inst-room-badge.dep {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #b45309;
}

.inst-room-badge.disc {
  background: rgba(31, 191, 117, 0.12);
  border-color: rgba(31, 191, 117, 0.45);
  color: #0d9e63;
}

.inst-room-badge.cancel {
  background: rgba(47, 128, 237, 0.12);
  border-color: rgba(47, 128, 237, 0.45);
  color: #1d6fd1;
}

[data-theme="dark"] .inst-room-badge.dep {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

[data-theme="dark"] .inst-room-badge.disc {
  background: rgba(31, 191, 117, 0.16);
  color: #34d399;
}

[data-theme="dark"] .inst-room-badge.cancel {
  background: rgba(47, 128, 237, 0.18);
  color: #93c5fd;
}
/* ---------- Admin preview banner (staff previewing a non-live listing) ---------- */
.preview-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 20px auto 0;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(217, 119, 6, 0.4);
  background: linear-gradient(135deg, var(--warning-tint), #fde68a);
  color: #78350f;
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.14);
}
.preview-banner .pb-ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(217, 119, 6, 0.18);
  color: #b45309;
}
.preview-banner .pb-txt {
  flex: 1 1 auto;
  min-width: 220px;
}
.preview-banner .pb-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font: 700 1rem/1.25 "Poppins", sans-serif;
}
.preview-banner .pb-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.45);
  color: #92400e;
  font: 700 0.7rem/1 "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.preview-banner .pb-note {
  margin: 5px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(120, 53, 15, 0.85);
}
.preview-banner .pb-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(120, 53, 15, 0.35);
  background: rgba(255, 255, 255, 0.6);
  color: #78350f;
  font: 600 0.84rem/1 "Poppins", sans-serif;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}
.preview-banner .pb-back:hover {
  background: var(--white);
  transform: translateY(-1px);
}
[data-theme="dark"] .preview-banner {
  background: linear-gradient(135deg, #3f2c05, #533a07);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .preview-banner .pb-ic {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
}
[data-theme="dark"] .preview-banner .pb-status {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}
[data-theme="dark"] .preview-banner .pb-note {
  color: rgba(253, 230, 138, 0.85);
}
[data-theme="dark"] .preview-banner .pb-back {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
[data-theme="dark"] .preview-banner .pb-back:hover {
  background: rgba(0, 0, 0, 0.4);
}
