/* public/css/style.css
   Tabing Hasselby Resort - simple, clean, beach/resort aesthetic
   Mobile-first, responsive. */

:root {
  --color-sea: #126782;
  --color-sea-light: #219ebc;
  --color-sky: #8ecae6;
  --color-sand: #edd9a3;
  --color-sand-light: #faf3e0;
  --color-text: #1b2a33;
  --color-white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(18, 103, 130, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--color-text);
  background: var(--color-sand-light);
  line-height: 1.5;
}

a {
  color: var(--color-sea);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow {
  max-width: 650px;
}

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  position: relative;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-sea);
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: block;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-sea);
}

.main-nav {
  display: none;
  flex-direction: column;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  box-shadow: var(--shadow);
}

.nav-toggle:checked ~ .main-nav {
  display: flex;
}

.main-nav a {
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  border-top: 1px solid #eee;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--color-sea);
  font-weight: 600;
}

.lang-toggle-btn {
  margin: 0.5rem 1.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-sea);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-sea);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  align-self: flex-start;
}

.lang-toggle-btn:hover {
  background: var(--color-sky);
}

@media (min-width: 768px) {
  .lang-toggle-btn {
    margin: 0 0 0 0.5rem;
    align-self: center;
  }
}

.sek-amount {
  color: #6b7f88;
  font-size: 0.85em;
}

@media (min-width: 768px) {
  .nav-toggle-label {
    display: none;
  }
  .main-nav {
    display: flex !important;
    flex-direction: row;
    position: static;
    box-shadow: none;
    width: auto;
    background: transparent;
  }
  .main-nav a {
    border-top: none;
    padding: 0.5rem 1rem;
  }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  color: var(--color-white);
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 103, 130, 0.55), rgba(18, 103, 130, 0.75));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 1.25rem;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.3rem;
  margin: 0 0 0.5rem;
}

.tagline {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}

.hero-location {
  margin: 0 0 1.5rem;
  opacity: 0.95;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin: 0.25rem 0.25rem 0.25rem 0;
}

.btn-primary {
  background: var(--color-sea);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-sea-light);
}

.btn-secondary {
  background: var(--color-sand);
  color: var(--color-text);
}

.btn-large {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

.btn-small {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

/* ---------------- Sections ---------------- */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--color-sky);
}

.section-intro {
  color: #3c5a66;
  margin-bottom: 1.5rem;
}

.cta-block {
  text-align: center;
}

/* ---------------- Amenity cards ---------------- */
.amenity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .amenity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .amenity-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.amenity-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.amenity-card h3 {
  margin-top: 0;
  color: var(--color-sea);
}

.amenity-price {
  font-weight: 700;
  color: var(--color-sea);
}

.amenity-price span {
  font-weight: 400;
  font-size: 0.8rem;
  color: #6b7f88;
}

.amenity-card-addon {
  border-left: 4px solid var(--color-sand);
}

/* ---------------- Forms ---------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #c7d6db;
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--color-white);
}

fieldset {
  border: 1px solid #c7d6db;
  border-radius: var(--radius);
  padding: 1rem;
}

legend {
  font-weight: 700;
  color: var(--color-sea);
  padding: 0 0.5rem;
}

.addon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eef3f5;
}

.addon-row:last-child {
  border-bottom: none;
}

.addon-qty-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.addon-qty {
  width: 70px !important;
}

.payment-option {
  display: block;
  padding: 0.35rem 0;
  font-weight: 400;
}

.price-summary {
  background: var(--color-sand-light);
  border: 1px dashed var(--color-sand);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
}

.price-total {
  font-weight: 700;
  font-size: 1.15rem;
  border-top: 1px solid var(--color-sand);
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  color: var(--color-sea);
}

.price-note {
  font-size: 0.8rem;
  color: #6b7f88;
  margin: 0.5rem 0 0;
}

/* ---------------- Alerts ---------------- */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.alert-error {
  background: #fde2e2;
  color: #9a2020;
}

.alert-success {
  background: #dcf4e1;
  color: #1c6b34;
}

/* ---------------- Info cards / placeholders ---------------- */
.info-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin: 1rem 0;
}

.placeholder-note {
  font-size: 0.85rem;
  color: #a16207;
  background: #fff7e0;
  border-left: 3px solid #f0c04a;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

/* ---------------- Map ---------------- */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1rem 0;
}

/* ---------------- Contact ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------- Admin ---------------- */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eef3f5;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--color-sky);
  color: var(--color-text);
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  background: #eee;
}

.status-paid,
.status-confirmed {
  background: #dcf4e1;
  color: #1c6b34;
}

.status-pending_payment,
.status-pending_bank_confirmation {
  background: #fff3cd;
  color: #8a6d1a;
}

.status-checked_in {
  background: #d6e8ff;
  color: #1a4a8a;
}

.status-checked_out {
  background: #e6e6e6;
  color: #555;
}

.status-cancelled {
  background: #fde2e2;
  color: #9a2020;
}

.occupancy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.occupancy-card {
  background: var(--color-white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1rem;
  border-left: 6px solid #3a9d5d;
}

.occupancy-card.occupied {
  border-left-color: #c0392b;
}

.occupancy-card.arriving {
  border-left-color: #e0a800;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.action-row form {
  margin: 0;
}

.admin-form {
  max-width: 560px;
}

.admin-form label {
  display: block;
  margin-top: 0.8rem;
  font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.5rem;
  box-sizing: border-box;
}

.flash {
  background: #dcf4e1;
  color: #1c6b34;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  margin: 0.5rem 0;
}

.flash.error {
  background: #fde2e2;
  color: #9a2020;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--color-sea);
  color: var(--color-white);
  padding: 2rem 1.25rem 1rem;
  margin-top: 2rem;
}

.footer-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-wrap p {
  margin: 0.2rem 0;
  opacity: 0.9;
}

.footer-copy {
  text-align: center;
  opacity: 0.75;
  font-size: 0.8rem;
  margin-top: 1.5rem;
}

/* ---------------- Availability calendar ---------------- */
.availability-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 2rem;
  font-size: 0.9rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.legend-swatch-available {
  background: #d7f0df;
  border: 1px solid #3f9a5c;
}

.legend-swatch-booked {
  background: #fde2e2;
  border: 1px solid #c45353;
}

.legend-swatch-past {
  background: #eee;
  border: 1px solid #ccc;
}

.availability-accommodation {
  margin-bottom: 2.5rem;
}

.availability-accommodation h2 {
  color: var(--color-sea);
  margin-bottom: 0.25rem;
}

.availability-capacity {
  font-weight: normal;
  font-size: 0.85rem;
  color: #55626a;
}

.availability-months {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.availability-month {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  width: 100%;
  max-width: 280px;
}

.availability-month h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-align: center;
  color: var(--color-sea);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 0.7rem;
  text-align: center;
  color: #55626a;
  margin-bottom: 0.25rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--color-text);
}

.calendar-cell-empty {
  background: transparent;
}

.calendar-cell-past {
  background: #f1f1f1;
  color: #aab0b4;
}

.calendar-cell-booked {
  background: #fde2e2;
  color: #9a2020;
}

.calendar-cell-available {
  background: #d7f0df;
  color: #205d2e;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
}

.calendar-cell-available:hover {
  background: #bfe8cc;
  transform: scale(1.08);
}

.calendar-cell-today {
  box-shadow: inset 0 0 0 2px var(--color-sea-light);
}

.availability-cta {
  text-align: center;
  margin-top: 1rem;
}

/* ---------------- Inline booking-page date picker ---------------- */
.date-picker-wrapper {
  margin: 0.5rem 0 1.5rem;
}

.date-picker-status {
  font-weight: 600;
  color: var(--color-sea);
  margin: 0.25rem 0 0.5rem;
}

.calendar-cell-selected {
  box-shadow: inset 0 0 0 2px #c48a2e;
}

.calendar-cell[role="button"] {
  cursor: pointer;
}

/* ---------------- Photos ---------------- */
.amenity-photo {
  display: block;
  width: calc(100% + 2.5rem);
  margin: -1.25rem -1.25rem 1rem;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #d7f0fa;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.photo-gallery img {
  cursor: zoom-in;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #d7f0fa;
}

@media (min-width: 700px) {
  .photo-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  .photo-gallery img {
    height: 220px;
  }
}

/* ---------------- Gallery lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  margin: 0;
  padding: 0 1rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}
