/* Booking modal styles. Class prefix: bk-. Self-contained, doesn't rely on
   theme classes. Visual tokens roughly match the Skansen brand. */

:root {
  --bk-bg:           #ffffff;
  --bk-bg-soft:      #ede9df;        /* warm beige body */
  --bk-text:         #1a202c;
  --bk-muted:        #4a5568;
  --bk-title:        #2d5a2d;        /* brand forest green */
  --bk-accent:       #b8d6b1;        /* sage / button bg */
  --bk-accent-hover: #a5c89d;
  --bk-avail:        #d8ebd0;        /* light pastel green (available) */
  --bk-avail-dim:    #ecf3e7;        /* even paler (few-left base) */
  --bk-soldout:      #ecc6bf;        /* pink/red striped (sold out) */
  --bk-soldout-line: #d49687;
  --bk-selected:     #1a2218;
  --bk-border:       #d1d5db;
  --bk-overlay:      rgba(20, 30, 20, 0.55);
  --bk-shadow:       0 12px 40px rgba(0, 0, 0, 0.25);
  --bk-radius:       12px;
  --bk-radius-sm:    8px;
}

.bk-overlay {
  position: fixed;
  inset: 0;
  background: var(--bk-overlay);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 99999;
  padding: 32px 16px;
  overflow-y: auto;
  font-family: "Plus Jakarta Sans", BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--bk-text);
  animation: bk-fade-in 160ms ease-out;
}
@keyframes bk-fade-in { from { opacity: 0 } to { opacity: 1 } }

.bk-modal {
  background: var(--bk-bg);
  width: 100%;
  max-width: 920px;
  border-radius: var(--bk-radius);
  box-shadow: var(--bk-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bk-header {
  display: flex;
  justify-content: flex-end;
  padding: 18px 24px;
  background: var(--bk-bg);
}

.bk-exit {
  background: none;
  border: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--bk-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}
.bk-exit:hover { opacity: 0.7; }
.bk-exit__x { font-size: 22px; line-height: 1; }

.bk-body {
  background: var(--bk-bg-soft);
  padding: 12px 48px 32px;
}

.bk-title {
  font-family: "GelicaRegular", "Plus Jakarta Sans", serif;
  color: var(--bk-title);
  font-size: 44px;
  font-weight: 400;
  margin: 0 0 16px;
  line-height: 1.15;
}

.bk-description {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 32px;
  color: var(--bk-text);
}
.bk-description a {
  color: inherit;
  text-decoration: underline;
}

.bk-card {
  background: var(--bk-bg);
  border-radius: var(--bk-radius);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.bk-card--with-calendar {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 760px) {
  .bk-card { padding: 20px; }
  .bk-card--with-calendar { grid-template-columns: 1fr; }
  .bk-body { padding: 12px 20px 24px; }
  .bk-title { font-size: 32px; }
}

/* Calendar */
.bk-cal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}
.bk-cal__nav {
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 10px;
  color: var(--bk-text);
}
.bk-cal__nav:disabled { opacity: 0.25; cursor: default; }
.bk-cal__month {
  font-weight: 600;
  font-size: 17px;
  min-width: 140px;
  text-align: center;
}
.bk-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 14px;
}
.bk-cal__grid--with-weeks {
  grid-template-columns: 24px repeat(7, 1fr);
}
.bk-cal__weekday {
  text-align: center;
  color: var(--bk-muted);
  font-size: 13px;
  padding: 6px 0;
}
.bk-cal__weeknum {
  align-self: center;
  text-align: center;
  color: var(--bk-muted);
  font-size: 13px;
}
.bk-cal__day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  border-radius: var(--bk-radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--bk-text);
  padding: 0;
  transition: transform 80ms;
}
.bk-cal__day:hover:not(:disabled) { transform: scale(1.04); }
.bk-cal__day:disabled { cursor: default; color: #b8bcc0; }
.bk-cal__day--blank { cursor: default; pointer-events: none; }
.bk-cal__day--past { color: #b8bcc0; cursor: default; }

.bk-cal__day--available {
  background: var(--bk-avail);
  font-weight: 600;
}
.bk-cal__day--few-left {
  background: repeating-linear-gradient(
    -45deg,
    var(--bk-avail) 0 6px,
    var(--bk-avail-dim) 6px 12px
  );
  font-weight: 600;
}
.bk-cal__day--sold-out {
  background: repeating-linear-gradient(
    -45deg,
    var(--bk-soldout) 0 6px,
    var(--bk-soldout-line) 6px 12px
  );
  cursor: not-allowed;
  color: var(--bk-muted);
}
.bk-cal__day--selected {
  background: var(--bk-selected) !important;
  color: #ffffff !important;
  font-weight: 700;
}
.bk-cal__price {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
}

.bk-cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--bk-muted);
}
.bk-cal__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bk-cal__legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}
.bk-cal__legend-dot--selected  { background: var(--bk-selected); }
.bk-cal__legend-dot--available { background: var(--bk-avail); }
.bk-cal__legend-dot--few-left  { background: repeating-linear-gradient(-45deg, var(--bk-avail) 0 4px, var(--bk-avail-dim) 4px 8px); }
.bk-cal__legend-dot--sold-out  { background: repeating-linear-gradient(-45deg, var(--bk-soldout) 0 4px, var(--bk-soldout-line) 4px 8px); }

/* Selected-date heading above counters (only shown when calendar present) */
.bk-selected-date {
  font-weight: 600;
  font-size: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bk-border);
  margin-bottom: 18px;
}

/* Categories */
.bk-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}
.bk-cat__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bk-cat__head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.bk-cat__name {
  text-decoration: underline;
  font-weight: 700;
  font-size: 16px;
}
.bk-cat__price {
  font-size: 15px;
  color: var(--bk-text);
}
.bk-cat__tip-btn {
  background: var(--bk-selected);
  color: #ffffff;
  border: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  font: 600 13px/1 serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bk-cat__tip-btn:hover { opacity: 0.85; }

.bk-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  max-width: 320px;
  background: #2a2a2a;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.35;
  z-index: 5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  pointer-events: none; /* don't intercept the outside-click handler */
}
.bk-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 22px;
  border: 6px solid transparent;
  border-top-color: #2a2a2a;
}
.bk-tooltip[hidden] { display: none; }

/* "I have a code" link + input form */
.bk-have-code {
  background: none;
  border: 0;
  padding: 8px 0 0;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--bk-text);
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
}
.bk-have-code:hover { opacity: 0.7; }

.bk-code-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.bk-code-form[hidden] { display: none; }
.bk-code-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--bk-border);
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
  background: var(--bk-bg);
}
.bk-code-input:focus { outline: 2px solid var(--bk-title); outline-offset: -1px; }
.bk-code-apply {
  background: var(--bk-selected);
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  height: 40px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.bk-code-apply:hover { opacity: 0.85; }
.bk-code-msg {
  font-size: 13px;
  color: var(--bk-muted);
  margin-top: 6px;
  min-height: 1em;
}

/* Counter */
.bk-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bk-counter__btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--bk-border);
  background: var(--bk-bg);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--bk-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bk-counter__btn:hover:not(:disabled) { background: #f3f4f6; }
.bk-counter__btn:disabled { opacity: 0.4; cursor: default; }
.bk-counter__count {
  min-width: 44px;
  height: 36px;
  border: 1px solid var(--bk-border);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Footer */
.bk-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 32px;
  padding: 22px 48px 28px;
  background: var(--bk-bg);
}
.bk-total {
  font-size: 18px;
  font-weight: 500;
}
.bk-submit {
  background: var(--bk-accent);
  color: var(--bk-text);
  border: 0;
  border-radius: 999px;
  padding: 14px 30px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 100ms;
}
.bk-submit:hover:not(:disabled) { background: var(--bk-accent-hover); }
.bk-submit:disabled { opacity: 0.55; cursor: default; }
.bk-submit__cart::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a202c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
@media (max-width: 760px) {
  .bk-footer { padding: 18px 20px 22px; gap: 16px; }
  .bk-submit { padding: 12px 22px; font-size: 15px; }
}

/* Trigger button shipped on pages — matches Skansen's primary .button style
   (forest green pill, white bold text). */
.booking-trigger {
  background-color: #007a24;
  color: #ffffff;
  border: 0;
  border-radius: 30px;
  padding: 18px 62px;
  font-family: "Plus Jakarta Sans", BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  display: inline-block;
  width: fit-content;
  min-width: 200px;
  max-width: 300px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.booking-trigger:hover,
.booking-trigger:focus {
  background-color: #283228;
  border-color: #283228;
  color: #ffffff;
}
.booking-trigger:disabled {
  background-color: #e9e7e4;
  color: rgba(40, 50, 40, 0.5);
  cursor: default;
}

/* Full-block trigger inside .product-cta__item — the entire green container
   is the clickable area. We strip the default pill styling and let the parent
   provide the background; the inner imageWrapper + title use Skansen's own
   rules. */
.booking-trigger--block {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0;
  min-width: 0 !important;
  max-width: none !important;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: opacity 0.15s;
}
.booking-trigger--block:hover,
.booking-trigger--block:focus {
  background: transparent !important;
  color: inherit !important;
  border-color: transparent !important;
  opacity: 0.88;
}
.booking-trigger--block .product-cta__itemTitle {
  flex: 1;
}
.booking-trigger--block .product-cta__itemTitle h5 {
  margin: 0;
}

/* Compact size when the trigger sits next to a "Läs mer / Read more" pair
   inside the product cards grid — matches the original .button--secondary
   sizing so the two buttons line up. */
.products .product-button-wrapper .buttons__list .booking-trigger {
  padding: 8px 17px;
  font-size: 16px;
  font-weight: 800;
  line-height: 20px;
  min-height: 40px;
  min-width: 0;
  max-width: 300px;
  width: 100%;
  border-radius: 50px;
  white-space: nowrap;
  box-sizing: border-box;
}
