/* Summaries are in the HTML for search engines; shown only inside the panel. */
.od-ts-summaries { display: none; }

html.od-ts-lock, html.od-ts-lock body { overflow: hidden; }

/* Inside uCard's own folding panel: uCard styles the text; we add the image and button. */
.od-ts-fold { --od-accent: #4a5a3c; }
.od-ts-fold .od-ts-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 45vh;
  object-fit: cover;
  margin: 0 0 1.5rem;
}
.od-ts-fold .od-ts-actions { margin: 1.5rem 0 0; }

/* Fallback slide-over panel: full screen on phones, a sheet from the right on wider screens. */
.od-ts-panel {
  --od-accent: #4a5a3c; /* Bronze Green, a classic Defender colour. Change to match the site. */
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 42rem);
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #222;
  font: inherit;
  line-height: 1.6;
  box-shadow: -1.5rem 0 3rem rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.od-ts-panel::backdrop { background: rgba(20, 24, 18, 0.55); }

.od-ts-panel .od-ts-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 45vh;
  object-fit: cover;
}

.od-ts-panel-inner .od-ts-content {
  padding: 1.75rem 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
  max-width: 38rem;
}

.od-ts-panel .od-ts-title {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: normal;
}
.od-ts-panel .od-ts-body p { margin: 0 0 1rem; }
.od-ts-panel .od-ts-actions { margin: 1.5rem 0 0; }

.od-ts-panel .od-ts-cta,
.od-ts-fold .od-ts-cta {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 3px;
  background: var(--od-accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.od-ts-panel .od-ts-cta:hover,
.od-ts-fold .od-ts-cta:hover { filter: brightness(1.12); }

.od-ts-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  margin: calc(0.5rem + env(safe-area-inset-top, 0px)) 0.5rem -3.25rem 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
}

.od-ts-panel .od-ts-cta:focus-visible,
.od-ts-fold .od-ts-cta:focus-visible,
.od-ts-close:focus-visible {
  outline: 3px solid var(--od-accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .od-ts-panel[open] { animation: od-ts-in 0.3s ease-out; }
  .od-ts-panel[open]::backdrop { animation: od-ts-fade 0.3s ease-out; }
  .od-ts-panel.od-ts-closing { animation: od-ts-out 0.28s ease-in forwards; }
  .od-ts-panel.od-ts-closing::backdrop { animation: od-ts-fade 0.28s ease-in reverse forwards; }
}
@keyframes od-ts-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes od-ts-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes od-ts-fade { from { opacity: 0; } to { opacity: 1; } }
