/* ============================================================
   BY Administration – Hostaway Booking Plugin
   Version 1.0.0
   ============================================================ */

:root {
  --by-primary:      #0d2d4e;   /* BY Admin dark navy */
  --by-primary-dark: #091e35;
  --by-accent:       #1a6fb4;   /* mid blue for links/buttons */
  --by-accent-hover: #1459a0;
  --by-white:        #ffffff;
  --by-off-white:    #f7f8fa;
  --by-border:       #e2e6ea;
  --by-text:         #1a1a2e;
  --by-muted:        #6b7280;
  --by-success:      #22c55e;
  --by-error:        #ef4444;
  --by-radius:       12px;
  --by-radius-sm:    8px;
  --by-shadow:       0 4px 24px rgba(13,45,78,.10);
  --by-shadow-lg:    0 8px 48px rgba(13,45,78,.18);
  --by-font:         'Segoe UI', system-ui, -apple-system, sans-serif;
  --by-transition:   0.22s ease;
}

/* ── Reset / Base ──────────────────────────────────────────── */
.by-listings-wrap *,
.by-listing-detail *,
.by-modal * {
  box-sizing: border-box;
}

/* ── Buttons ───────────────────────────────────────────────── */
.by-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--by-font);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--by-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--by-transition);
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
}
.by-btn:focus-visible { outline: 3px solid var(--by-accent); outline-offset: 2px; }

.by-btn-primary {
  background: var(--by-primary);
  color: var(--by-white);
  border-color: var(--by-primary);
}
.by-btn-primary:hover {
  background: var(--by-primary-dark);
  border-color: var(--by-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13,45,78,.25);
  color: var(--by-white);
  text-decoration: none;
}

.by-btn-outline {
  background: transparent;
  color: var(--by-primary);
  border-color: var(--by-primary);
}
.by-btn-outline:hover {
  background: var(--by-primary);
  color: var(--by-white);
  text-decoration: none;
}

.by-btn-sm  { font-size: 13px; padding: 8px 16px; }
.by-btn-full { width: 100%; }

/* ── Filters bar ───────────────────────────────────────────── */
.by-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: var(--by-white);
  border: 1px solid var(--by-border);
  border-radius: var(--by-radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--by-shadow);
}
.by-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 130px;
}
.by-filter-group label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--by-muted);
}
.by-filter-group input,
.by-filter-group select {
  padding: 10px 14px;
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  font-family: var(--by-font);
  font-size: 14px;
  color: var(--by-text);
  background: var(--by-white);
  transition: border-color var(--by-transition);
  width: 100%;
}
.by-filter-group input:focus,
.by-filter-group select:focus {
  outline: none;
  border-color: var(--by-accent);
}

/* ── Results meta ──────────────────────────────────────────── */
.by-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
#by-results-count { font-size: 15px; color: var(--by-muted); }
.by-view-toggle { display: flex; gap: 4px; }
.by-view-btn {
  background: none;
  border: 1.5px solid var(--by-border);
  border-radius: 6px;
  width: 34px; height: 34px;
  font-size: 16px; cursor: pointer;
  transition: all var(--by-transition);
}
.by-view-btn.active,
.by-view-btn:hover { background: var(--by-primary); color: var(--by-white); border-color: var(--by-primary); }

/* ── Listings Grid ─────────────────────────────────────────── */
.by-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 28px;
}
.by-listings-grid.list-view {
  grid-template-columns: 1fr;
}
.by-listings-grid.list-view .by-listing-card {
  flex-direction: row;
  max-height: 200px;
}
.by-listings-grid.list-view .by-card-image-wrap {
  width: 280px;
  flex-shrink: 0;
  border-radius: var(--by-radius) 0 0 var(--by-radius);
}
.by-listings-grid.list-view .by-card-body { flex: 1; }

/* ── Listing Card ──────────────────────────────────────────── */
.by-listing-card {
  background: var(--by-white);
  border-radius: var(--by-radius);
  overflow: hidden;
  box-shadow: var(--by-shadow);
  border: 1px solid var(--by-border);
  transition: transform var(--by-transition), box-shadow var(--by-transition);
  display: flex;
  flex-direction: column;
}
.by-listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--by-shadow-lg);
}

.by-card-image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--by-off-white);
  flex-shrink: 0;
}
.by-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity var(--by-transition);
}
.by-card-img-hover {
  position: absolute; inset: 0;
  opacity: 0;
}
.by-card-image-wrap:hover .by-card-img-primary { transform: scale(1.04); }
.by-card-image-wrap:hover .by-card-img-hover   { opacity: 1; }

.by-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e8edf2 0%, #d1dae5 100%);
}

.by-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--by-white);
  color: var(--by-text);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.by-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.by-card-location {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--by-muted);
}
.by-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.by-card-title a {
  color: var(--by-text);
  text-decoration: none;
  transition: color var(--by-transition);
}
.by-card-title a:hover { color: var(--by-accent); }

.by-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--by-muted);
  margin-top: 2px;
}
.by-card-meta span { display: flex; align-items: center; gap: 4px; }

.by-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--by-border);
}
.by-card-price { font-size: 14px; color: var(--by-muted); }
.by-card-price strong { font-size: 17px; color: var(--by-text); }
.by-price-on-request { font-size: 13px; font-style: italic; }

/* ── Back link ─────────────────────────────────────────────── */
.by-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--by-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color var(--by-transition);
}
.by-back-link:hover { color: var(--by-primary); }

/* ── Gallery ───────────────────────────────────────────────── */
.by-gallery { margin-bottom: 36px; }
.by-gallery-main {
  border-radius: var(--by-radius);
  overflow: hidden;
  height: 480px;
  margin-bottom: 10px;
}
.by-gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .3s;
}
.by-gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}
.by-thumb {
  width: 100px; height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2.5px solid transparent;
  flex-shrink: 0;
  transition: border-color var(--by-transition), opacity var(--by-transition);
  opacity: .7;
}
.by-thumb.active,
.by-thumb:hover { border-color: var(--by-primary); opacity: 1; }

.by-all-photos-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100px; height: 72px;
  border-radius: 8px;
  border: 2px solid var(--by-border);
  background: var(--by-off-white);
  font-size: 13px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  color: var(--by-primary);
  transition: all var(--by-transition);
}
.by-all-photos-btn:hover { background: var(--by-primary); color: var(--by-white); }

/* ── Detail Layout ─────────────────────────────────────────── */
.by-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}
.by-detail-main { min-width: 0; }

.by-detail-location {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--by-muted);
  margin-bottom: 8px;
}
.by-detail-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--by-text);
  margin: 0 0 16px;
  line-height: 1.2;
}
.by-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
  color: var(--by-muted);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--by-border);
}
.by-detail-stats strong { color: var(--by-text); }

/* ── Detail Sections ───────────────────────────────────────── */
.by-detail-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--by-border);
}
.by-detail-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--by-text);
  margin: 0 0 16px;
}
.by-description {
  font-size: 15px;
  line-height: 1.7;
  color: #374151;
  max-height: 150px;
  overflow: hidden;
  transition: max-height .4s ease;
}
.by-description.expanded { max-height: 2000px; }
.by-read-more {
  background: none; border: none;
  color: var(--by-accent); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 8px 0 0; text-decoration: underline;
}

/* ── Amenities ─────────────────────────────────────────────── */
.by-amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.by-amenity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--by-text);
}
.by-amenity-icon { font-size: 20px; }

/* ── Rules ─────────────────────────────────────────────────── */
.by-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.by-rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--by-text);
}

/* ── Booking Panel ─────────────────────────────────────────── */
.by-booking-panel {
  position: sticky;
  top: 100px;
}
.by-panel-inner {
  background: var(--by-white);
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius);
  padding: 28px;
  box-shadow: var(--by-shadow-lg);
}

.by-panel-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--by-text);
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.by-price-amount { font-size: 28px; }
.by-price-unit { font-size: 16px; font-weight: 400; color: var(--by-muted); }

/* Date picker */
.by-date-picker {
  display: flex;
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.by-date-field {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.by-date-field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--by-muted);
}
.by-date-input {
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--by-font);
  color: var(--by-text);
  padding: 0;
  width: 100%;
  cursor: pointer;
}
.by-date-divider {
  width: 1px;
  background: var(--by-border);
  align-self: stretch;
}

/* Guests */
.by-guests-field {
  background: var(--by-off-white);
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.by-guests-field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--by-muted);
  display: block;
  margin-bottom: 8px;
}
.by-guests-control {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--by-text);
}
.by-guests-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--by-border);
  background: var(--by-white);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  transition: all var(--by-transition);
  display: flex; align-items: center; justify-content: center;
}
.by-guests-btn:hover { border-color: var(--by-primary); background: var(--by-primary); color: var(--by-white); }
.by-guests-field small { font-size: 12px; color: var(--by-muted); margin-top: 6px; display: block; }

/* Price breakdown */
.by-price-breakdown {
  background: var(--by-off-white);
  border-radius: var(--by-radius-sm);
  padding: 16px;
  margin: 16px 0;
  font-size: 14px;
}
.by-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  color: var(--by-text);
}
.by-breakdown-row.total {
  border-top: 1px solid var(--by-border);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 16px;
}

/* Upsells */
.by-upsells {
  margin: 16px 0;
}
.by-upsells h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--by-text);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.by-upsell-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color var(--by-transition), background var(--by-transition);
}
.by-upsell-item:hover { border-color: var(--by-accent); background: #f0f7ff; }
.by-upsell-item.selected { border-color: var(--by-primary); background: #f0f4f9; }
.by-upsell-item input[type=checkbox] { margin-top: 2px; flex-shrink: 0; }
.by-upsell-info { flex: 1; }
.by-upsell-name { font-size: 14px; font-weight: 600; color: var(--by-text); }
.by-upsell-desc { font-size: 12px; color: var(--by-muted); margin-top: 2px; }
.by-upsell-price { font-size: 14px; font-weight: 700; color: var(--by-primary); white-space: nowrap; }

.by-no-charge-note {
  text-align: center;
  font-size: 12px;
  color: var(--by-muted);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ── Checkout Modal ────────────────────────────────────────── */
.by-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin-top: 24px;
}
.by-checkout-form h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
}
.by-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.by-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.by-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--by-text);
}
.by-form-group input,
.by-form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  font-family: var(--by-font);
  font-size: 14px;
  color: var(--by-text);
  transition: border-color var(--by-transition);
  width: 100%;
}
.by-form-group input:focus,
.by-form-group textarea:focus {
  outline: none;
  border-color: var(--by-accent);
  box-shadow: 0 0 0 3px rgba(26,111,180,.08);
}
.by-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--by-muted);
  margin-bottom: 20px;
}
.by-terms-check a { color: var(--by-accent); }

.by-checkout-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: var(--by-error);
  border-radius: var(--by-radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.by-secure-note {
  text-align: center;
  font-size: 12px;
  color: var(--by-muted);
  margin-top: 12px;
  margin-bottom: 0;
}

/* Checkout summary sidebar */
.by-checkout-summary {
  background: var(--by-off-white);
  border-radius: var(--by-radius);
  padding: 24px;
  height: fit-content;
  font-size: 14px;
  border: 1px solid var(--by-border);
  position: sticky;
  top: 24px;
}
.by-checkout-summary h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
}
.by-checkout-summary img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--by-radius-sm);
  margin-bottom: 14px;
}

/* ── Modals ────────────────────────────────────────────────── */
.by-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(9,30,53,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: byFadeIn .25s ease;
}
@keyframes byFadeIn { from { opacity: 0; } to { opacity: 1; } }

.by-modal-inner {
  background: var(--by-white);
  border-radius: var(--by-radius);
  padding: 40px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: bySlideUp .28s ease;
}
@keyframes bySlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.by-checkout-inner { max-width: 900px; }

.by-modal-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--by-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--by-transition);
}
.by-modal-close:hover { background: var(--by-off-white); color: var(--by-text); }

/* Lightbox */
.by-lightbox {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  overflow-y: auto;
  padding: 60px 20px 20px;
}
.by-lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--by-white);
  font-size: 22px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1;
}
.by-lightbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}
.by-lightbox-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
}

/* Success */
.by-success-inner {
  text-align: center;
  max-width: 480px;
  padding: 60px 40px;
}
.by-success-icon {
  width: 72px; height: 72px;
  background: var(--by-success);
  color: var(--by-white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}
.by-success-inner h2 { font-size: 28px; margin-bottom: 12px; }
.by-success-inner p { color: var(--by-muted); line-height: 1.6; margin-bottom: 28px; }

/* ── Availability Status ────────────────────────────────────── */
.by-availability-msg {
  padding: 14px 16px;
  border-radius: var(--by-radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
}
.by-availability-msg.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.by-availability-msg.error   { background: #fef2f2; color: var(--by-error); border: 1px solid #fca5a5; }

/* ── Error / Empty states ──────────────────────────────────── */
.by-error { color: var(--by-error); font-size: 14px; padding: 16px; background: #fef2f2; border-radius: var(--by-radius-sm); }
.by-empty { color: var(--by-muted); font-size: 15px; padding: 40px; text-align: center; }

/* ── Loading spinner ───────────────────────────────────────── */
.by-loading {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: var(--by-white);
  border-radius: 50%;
  animation: bySpin .7s linear infinite;
  vertical-align: middle;
}
@keyframes bySpin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .by-detail-layout { grid-template-columns: 1fr; }
  .by-booking-panel { position: static; }
  .by-gallery-main { height: 300px; }
  .by-checkout-layout { grid-template-columns: 1fr; }
  .by-checkout-summary { display: none; }
}
@media (max-width: 640px) {
  .by-listings-grid { grid-template-columns: 1fr; }
  .by-filters { flex-direction: column; }
  .by-filter-group { min-width: auto; width: 100%; }
  .by-modal-inner { padding: 24px 20px; }
  .by-form-row { grid-template-columns: 1fr; }
  .by-detail-title { font-size: 22px; }
}

/* ── Visual Calendar Widget ─────────────────────────────────── */
.by-cal-widget {
  margin-bottom: 16px;
}
.by-cal-labels {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.by-cal-label-field {
  flex: 1;
  padding: 12px 14px;
  cursor: pointer;
  transition: background var(--by-transition);
}
.by-cal-label-field.active {
  background: var(--by-primary);
}
.by-cal-label-field.active .by-cal-label-title,
.by-cal-label-field.active .by-cal-label-val {
  color: var(--by-white);
}
.by-cal-label-title {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--by-muted);
  margin-bottom: 4px;
}
.by-cal-label-val {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--by-text);
}
.by-cal-arrow {
  padding: 0 10px;
  color: var(--by-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.by-cal-body {
  border: 1.5px solid var(--by-border);
  border-radius: var(--by-radius-sm);
  padding: 16px;
  background: var(--by-white);
}
.by-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.by-cal-nav-btn {
  background: none;
  border: 1.5px solid var(--by-border);
  border-radius: 6px;
  width: 32px; height: 32px;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  transition: all var(--by-transition);
  display: flex; align-items: center; justify-content: center;
  color: var(--by-text);
}
.by-cal-nav-btn:hover {
  background: var(--by-primary);
  border-color: var(--by-primary);
  color: var(--by-white);
}
.by-cal-month-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--by-text);
}

.by-cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.by-cal-days-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--by-muted);
  text-transform: uppercase;
  padding: 4px 0;
}

.by-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.by-cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--by-transition), color var(--by-transition);
  position: relative;
}
.by-cal-cell:not(.by-cal-blocked):not(.by-cal-empty):hover {
  background: var(--by-off-white);
}
.by-cal-cell.by-cal-empty {
  cursor: default;
}
.by-cal-cell.by-cal-blocked {
  cursor: not-allowed;
  opacity: 0.35;
}
.by-cal-cell.by-cal-blocked .by-cal-day {
  text-decoration: line-through;
}
.by-cal-cell.by-cal-today .by-cal-day {
  font-weight: 700;
  color: var(--by-accent);
}
.by-cal-cell.by-cal-selected-in,
.by-cal-cell.by-cal-selected-out {
  background: var(--by-primary);
  color: var(--by-white);
  border-radius: 6px;
}
.by-cal-cell.by-cal-selected-in .by-cal-day,
.by-cal-cell.by-cal-selected-out .by-cal-day {
  color: var(--by-white);
}
.by-cal-cell.by-cal-in-range {
  background: rgba(13,45,78,.10);
  border-radius: 0;
}
.by-cal-cell.by-cal-in-range + .by-cal-selected-out,
.by-cal-cell.by-cal-selected-in + .by-cal-in-range {
  border-radius: 0;
}
.by-cal-day {
  font-size: 13px;
  font-weight: 500;
  color: var(--by-text);
  line-height: 1;
}

@media (max-width: 420px) {
  .by-cal-body { padding: 10px 8px; }
  .by-cal-day  { font-size: 11px; }
}
