/* FREE SAILING — fs-card-panel.css
   Bottom sheet on mobile (<= 640px), side panel on desktop.
   44px tap targets, smooth slide transitions, accessible focus.
*/

.fs-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 43, 131, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.fs-panel-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fs-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: #ffffff;
  z-index: 1001;
  box-shadow: -4px 0 28px rgba(2, 43, 131, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.fs-panel.is-open {
  transform: translateX(0);
}

.fs-panel-drag {
  display: none;
}

.fs-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #D8E3EF);
  flex-shrink: 0;
}

.fs-panel-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-text, #0282C0);
}

.fs-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink-40, #5A6D82);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.fs-panel-close:hover {
  background: var(--pale, #F3F7FC);
  color: var(--navy, #022B83);
}

.fs-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.fs-panel-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--r-s, 8px);
  margin-bottom: 16px;
  background: var(--pale, #F3F7FC);
}

.fs-panel-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--navy, #022B83);
  font-weight: 700;
}

.fs-panel-subtitle {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-60, #3B4B5B);
  margin-bottom: 14px;
}

.fs-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.fs-panel-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-60, #3B4B5B);
  margin: 14px 0 18px;
  white-space: pre-wrap;
}

.fs-panel-actions-wrap {
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line, #D8E3EF);
  border-bottom: 1px solid var(--line, #D8E3EF);
}

.fs-panel-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.fs-panel-full-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-s, 8px);
  background: var(--navy, #022B83);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.fs-panel-full-page:hover {
  background: #011E5E;
  color: #ffffff;
  text-decoration: none;
}

/* Phone: Bottom Sheet */
@media (max-width: 640px) {
  .fs-panel {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -6px 28px rgba(2, 43, 131, 0.18);
  }

  .fs-panel.is-open {
    transform: translateY(0);
  }

  .fs-panel-drag {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #CBD5E1;
    margin: 10px auto 4px;
    flex-shrink: 0;
  }

  .fs-panel-hd {
    padding: 8px 16px 12px;
  }

  .fs-panel-body {
    padding: 16px;
  }
}

/* the page behind an open panel stays put; the panel scrolls on its own */
html.fs-panel-lock, html.fs-panel-lock body{ overflow:hidden; }
.fs-panel{ overscroll-behavior:contain; }
.fs-panel-hd{ touch-action:none; }
