.phhc-calendar {
  --phhc-accent: #a68a5b;
  --phhc-accent-dark: #8d7447;
  --phhc-border: #ded8cd;
  --phhc-muted: #6f6b64;
  --phhc-background: #ffffff;
  --phhc-soft: #f7f5f0;
  --phhc-dark: #1f2d28;
  --phhc-text: #242321;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  color: var(--phhc-text);
  font-family: Poppins, Arial, sans-serif;
}

.phhc-calendar *,
.phhc-calendar *::before,
.phhc-calendar *::after {
  box-sizing: border-box;
}

/* Long booking banner */
.phhc-booking-banner {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.15fr)
    minmax(170px, 1fr)
    minmax(170px, 1fr)
    minmax(130px, 0.72fr)
    minmax(190px, 1fr);
  min-height: 108px;
  overflow: hidden;
  border: 1px solid var(--phhc-border);
  border-radius: 4px;
  background: var(--phhc-background);
  box-shadow: 0 18px 45px rgba(31, 45, 40, 0.14);
}

.phhc-banner-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 28px;
  background: var(--phhc-dark);
  color: #fff;
}

.phhc-kicker,
.phhc-picker-kicker {
  margin: 0 0 4px;
  color: #d7bf80;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
}

.phhc-title {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.phhc-date-trigger,
.phhc-guests {
  position: relative;
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--phhc-border);
  background: #fff;
}

.phhc-date-trigger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 23px 54px 22px 25px;
  color: var(--phhc-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.phhc-date-trigger:hover,
.phhc-date-trigger:focus-visible,
.phhc-date-trigger.is-active {
  background: var(--phhc-soft);
  box-shadow: inset 0 -3px 0 var(--phhc-accent);
  outline: none;
}

.phhc-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--phhc-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.phhc-checkin,
.phhc-checkout {
  display: block;
  overflow: hidden;
  color: var(--phhc-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phhc-calendar-icon {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 18px;
  height: 17px;
  border: 1.5px solid var(--phhc-accent);
  border-radius: 2px;
  transform: translateY(-50%);
}

.phhc-calendar-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 2px;
  left: 2px;
  border-top: 1.5px solid var(--phhc-accent);
}

.phhc-calendar-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 3px;
  width: 9px;
  height: 5px;
  border-right: 1.5px solid var(--phhc-accent);
  border-left: 1.5px solid var(--phhc-accent);
}

.phhc-guests {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 21px 20px;
}

.phhc-guest-input {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.phhc-guests input {
  width: 48px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--phhc-border);
  border-radius: 0;
  background: transparent;
  color: var(--phhc-text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.phhc-guests input:focus {
  border-bottom-color: var(--phhc-accent);
  outline: none;
}

.phhc-guest-input > span {
  color: var(--phhc-muted);
  font-size: 13px;
}

.phhc-search,
.phhc-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--phhc-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.2s ease;
}

.phhc-search {
  min-height: 108px;
  padding: 20px 26px;
}

.phhc-search:hover:not(:disabled),
.phhc-search:focus-visible:not(:disabled),
.phhc-book:hover,
.phhc-book:focus-visible {
  background: var(--phhc-accent-dark);
  color: #fff;
}

.phhc-search:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

/* Expandable calendar panel */
.phhc-picker {
  position: relative;
  z-index: 20;
  margin-top: 12px;
  padding: 28px;
  border: 1px solid var(--phhc-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 24px 55px rgba(31, 45, 40, 0.16);
}

.phhc-picker[hidden] {
  display: none !important;
}

.phhc-picker-heading,
.phhc-navigation,
.phhc-picker-footer,
.phhc-legend {
  display: flex;
  align-items: center;
}

.phhc-picker-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.phhc-picker-kicker {
  color: var(--phhc-accent-dark);
}

.phhc-picker-title {
  margin: 0 0 4px;
  color: var(--phhc-dark);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.phhc-instruction {
  margin: 0;
  color: var(--phhc-muted);
  font-size: 14px;
}

.phhc-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--phhc-border);
  border-radius: 50%;
  background: #fff;
  color: var(--phhc-dark);
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  line-height: 1;
}

.phhc-close:hover,
.phhc-close:focus-visible {
  border-color: var(--phhc-accent);
  color: var(--phhc-accent-dark);
  outline: none;
}

.phhc-navigation {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.phhc-navigation-label {
  color: var(--phhc-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.phhc-nav {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--phhc-border);
  border-radius: 50%;
  background: #fff;
  color: var(--phhc-text);
  cursor: pointer;
  font: inherit;
  font-size: 27px;
  line-height: 1;
}

.phhc-nav:hover:not(:disabled),
.phhc-nav:focus-visible:not(:disabled) {
  border-color: var(--phhc-accent);
  color: var(--phhc-accent-dark);
  outline: none;
}

.phhc-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.phhc-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.phhc-month {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--phhc-border);
  border-radius: 3px;
  background: var(--phhc-background);
}

.phhc-month-title {
  margin: 0 0 16px;
  color: var(--phhc-dark);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.phhc-weekdays,
.phhc-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.phhc-weekdays {
  margin-bottom: 8px;
  color: var(--phhc-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.phhc-day,
.phhc-day-spacer {
  aspect-ratio: 1 / 1;
  min-width: 0;
}

.phhc-day {
  position: relative;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--phhc-text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.phhc-day.is-available:hover:not(:disabled),
.phhc-day.is-available:focus-visible:not(:disabled) {
  border-color: var(--phhc-accent);
  background: color-mix(in srgb, var(--phhc-accent) 10%, white);
  outline: none;
}

.phhc-day.is-in-range {
  border-radius: 3px;
  background: color-mix(in srgb, var(--phhc-accent) 15%, white);
}

.phhc-day.is-selected {
  border-color: var(--phhc-accent);
  border-radius: 50%;
  background: var(--phhc-accent);
  color: #fff;
  font-weight: 700;
}

.phhc-day.is-unavailable {
  color: #aaa59d;
  cursor: not-allowed;
  text-decoration: line-through;
}

.phhc-day.is-unavailable.is-checkout-only {
  border-color: var(--phhc-accent);
  cursor: pointer;
  text-decoration: line-through;
}

.phhc-day.is-unavailable.is-checkout-only:hover,
.phhc-day.is-unavailable.is-checkout-only:focus-visible {
  background: color-mix(in srgb, var(--phhc-accent) 10%, white);
}

.phhc-day.is-unavailable::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18%;
  left: 18%;
  height: 1.5px;
  border-radius: 2px;
  background: #b8b2a8;
  transform: rotate(-24deg);
}

.phhc-day.is-past {
  color: #cbc7c0;
  cursor: not-allowed;
}

.phhc-picker-footer {
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.phhc-legend {
  flex-wrap: wrap;
  gap: 18px;
  color: var(--phhc-muted);
  font-size: 12px;
}

.phhc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.phhc-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.phhc-dot-available {
  border: 1px solid var(--phhc-accent);
  background: #fff;
}

.phhc-dot-unavailable {
  position: relative;
  border: 1px solid #c7c2ba;
  background: #fff;
}

.phhc-dot-unavailable::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -2px;
  left: -2px;
  border-top: 1px solid #aaa59d;
  transform: rotate(-28deg);
}

.phhc-clear {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--phhc-border);
  border-radius: 2px;
  background: #fff;
  color: var(--phhc-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phhc-clear:hover,
.phhc-clear:focus-visible {
  border-color: var(--phhc-accent);
  color: var(--phhc-accent-dark);
  outline: none;
}

/* Status and results */
.phhc-status {
  min-height: 0;
  margin: 12px 0 0;
  color: var(--phhc-muted);
  font-size: 14px;
}

.phhc-status:empty {
  display: none;
}

.phhc-status.is-error {
  color: #9a2f2f;
}

.phhc-status.is-success {
  color: #286b45;
}

.phhc-status.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: phhc-spin 0.8s linear infinite;
}

.phhc-results {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.phhc-results:empty {
  margin-top: 0;
}

.phhc-room {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  overflow: hidden;
  border: 1px solid var(--phhc-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 45, 40, 0.07);
}

.phhc-room-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
}

.phhc-room-body {
  padding: 24px;
}

.phhc-room-title {
  margin: 0 0 8px;
  color: var(--phhc-dark);
  font-size: 22px;
  font-weight: 600;
}

.phhc-room-details {
  margin: 0 0 14px;
  color: var(--phhc-muted);
  font-size: 14px;
}

.phhc-room-price {
  margin: 0 0 18px;
  color: var(--phhc-text);
  font-size: 18px;
  font-weight: 700;
}

.phhc-book {
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 2px;
}

.phhc-book.is-disabled {
  background: #c7c2ba;
  cursor: not-allowed;
}

@keyframes phhc-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .phhc-booking-banner {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .phhc-banner-intro {
    grid-column: 1 / -1;
    min-height: 92px;
  }

  .phhc-guests {
    border-right: 0;
  }

  .phhc-search {
    min-height: 82px;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .phhc-months {
    grid-template-columns: 1fr;
  }

  .phhc-months .phhc-month:nth-child(n + 2) {
    display: none;
  }

  .phhc-picker {
    padding: 20px;
  }

  .phhc-room {
    grid-template-columns: 1fr;
  }

  .phhc-room-image {
    max-height: 250px;
  }
}

@media (max-width: 580px) {
  .phhc-booking-banner {
    display: block;
  }

  .phhc-banner-intro {
    min-height: auto;
    padding: 22px;
  }

  .phhc-date-trigger,
  .phhc-guests {
    width: 100%;
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--phhc-border);
  }

  .phhc-search {
    width: 100%;
    min-height: 64px;
  }

  .phhc-picker {
    padding: 16px 12px;
  }

  .phhc-picker-heading {
    align-items: flex-start;
  }

  .phhc-month {
    padding: 12px 8px;
  }

  .phhc-weekdays,
  .phhc-days {
    gap: 2px;
  }

  .phhc-day {
    font-size: 13px;
  }

  .phhc-picker-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Reliability states added in 1.1.5. These preserve the existing visual style
   while avoiding false sold-out dates during a temporary Hostaway/API delay. */
.phhc-day.is-unknown:not(:disabled):hover,
.phhc-day.is-unknown:not(:disabled):focus-visible {
  border-color: var(--phhc-accent);
  background: color-mix(in srgb, var(--phhc-accent) 7%, white);
  outline: none;
}

.phhc-status.is-warning {
  color: #7a5b1f;
}

.phhc-fallback {
  padding: 14px 0 2px;
  text-align: center;
}

.phhc-fallback-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--phhc-accent);
  border-radius: 2px;
  background: #fff;
  color: var(--phhc-accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
}

.phhc-fallback-link:hover,
.phhc-fallback-link:focus-visible {
  background: color-mix(in srgb, var(--phhc-accent) 8%, white);
  outline: none;
}
