/* Shared ride + group excursion trip cards — listing, transport routes, Z-Bids */
@import url('shared-ride-tier-tokens.css');

/* ── Section shells (transport pages) — NO nested white “card” heads ── */
.transport-shared-rides-section,
.group-excursion-offers-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: clip;
    margin: 0 0 var(--td-section-gap, 2rem);
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.transport-shared-rides-section__title,
.group-excursion-offers-section__title {
    margin: 0 0 0.65rem;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-dark, #1E293B);
    font-family: var(--font-heading, 'Outfit', sans-serif);
    letter-spacing: -0.02em;
}

.transport-shared-rides-section__sub,
.transport-shared-rides__empty {
    margin: 0 0 0.85rem;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--trains-text-dim, var(--z-text-secondary, #64748b));
}

.group-excursion-offers-section__cards,
.transport-shared-rides__cards,
.shared-ride-indicator-block {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.group-excursion-offers-section__foot,
.transport-shared-rides__zbids-foot {
    margin: 0.85rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--trains-text-dim, var(--z-text-secondary));
}

.group-excursion-offers-section__foot a,
.transport-shared-rides__zbids-foot a {
    font-weight: 700;
    color: var(--trains-primary, var(--z-action-blue));
    text-decoration: none;
}

/* ── Trip card: ONE solid block ── */
.shared-ride-trip-card {
    position: relative;
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    padding: 1rem 1.1rem !important;
    border-radius: 14px !important;
    border: 2px solid var(--sr-tier-border, #c8e6c9) !important;
    background: var(--sr-tier-bg, linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%)) !important;
    box-shadow: var(--sr-tier-shadow, 0 2px 12px rgba(76, 175, 80, 0.12)) !important;
    text-decoration: none !important;
    color: inherit !important;
    font-weight: inherit !important;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.shared-ride-trip-card[href*="/listings/"],
a.group-excursion-trip-card[href*="/listings/"] {
    display: block !important;
    color: inherit !important;
    font-weight: inherit !important;
    text-decoration: none !important;
    padding: 1rem 1.1rem !important;
    border-radius: 14px !important;
    border: 2px solid var(--sr-tier-border, #c8e6c9) !important;
    background: var(--sr-tier-bg, linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%)) !important;
    box-shadow: var(--sr-tier-shadow, 0 2px 12px rgba(76, 175, 80, 0.12)) !important;
}

a.group-excursion-trip-card--has-cover[href*="/listings/"] {
    padding-top: 0 !important;
}

a.shared-ride-trip-card:hover {
    box-shadow: var(--sr-tier-shadow-hover, 0 6px 20px rgba(76, 175, 80, 0.2));
    transform: translateY(-1px);
}

.shared-ride-trip-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}
.shared-ride-trip-card__icon { font-size: 1.4rem; line-height: 1.2; flex-shrink: 0; }
.shared-ride-trip-card__title-wrap { flex: 1; min-width: 0; }
.shared-ride-trip-card__title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--sr-tier-text-strong, #1b5e20);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.shared-ride-trip-card__badge {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--sr-tier-badge-text, #2e7d32);
    background: var(--sr-tier-badge-bg, rgba(46, 125, 50, 0.12));
    border: 1px solid var(--sr-tier-badge-border, rgba(46, 125, 50, 0.25));
}

.shared-ride-trip-card__route {
    font-size: 0.88rem;
    color: var(--sr-tier-route-muted, #558b2f);
    margin-bottom: 0.6rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.shared-ride-trip-card__seats { display: flex; flex-direction: column; gap: 0.35rem; }
.shared-ride-trip-card__progress {
    height: 8px;
    border-radius: 4px;
    background: var(--sr-tier-progress-track, rgba(46, 125, 50, 0.15));
    overflow: hidden;
}
.shared-ride-trip-card__progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    background: var(--sr-tier-progress-fill, #43a047);
}
.shared-ride-trip-card__seats-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sr-tier-text-strong, #1b5e20);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.shared-ride-trip-card__price {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sr-tier-price, #2e7d32);
}

/* CTA stays INSIDE the same card — never a separate floating block */
.shared-ride-trip-card__cta {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: var(--sr-tier-cta, #2e7d32);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    box-sizing: border-box;
}

.shared-ride-trip-card__join-btn {
    margin-top: 0.65rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--sr-tier-cta, #2e7d32);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Group excursion: cover + optional share (share off on transport) */
.group-excursion-trip-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.group-excursion-trip-card--has-cover { padding-top: 0 !important; overflow: hidden; }
.group-excursion-trip-card__cover {
    height: 88px;
    width: calc(100% + 2.2rem);
    max-width: none;
    background-size: cover;
    background-position: center;
    position: relative;
    margin: 0 -1.1rem 0.75rem;
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
}
.group-excursion-trip-card__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.62) 0%, rgba(21, 101, 192, 0.48) 100%);
    mix-blend-mode: multiply;
}
.group-excursion-trip-card__subtitle {
    font-size: 0.82rem;
    color: #555;
    margin-top: 0.15rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.group-excursion-trip-card__foot {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0.15rem;
    box-sizing: border-box;
}
.group-excursion-trip-card__foot .shared-ride-trip-card__cta {
    margin-top: 0.55rem;
    flex: 0 0 auto;
}
.group-excursion-trip-card__share {
    display: none; /* transport/catalog: no share icon squares inside the card */
}

/* Listing-page share notes (when share is enabled) */
.shared-ride-indicator-block { margin: 1rem 0; }
.shared-ride-trip-card__note,
.shared-ride-trip-card__share-wait {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--sr-tier-muted, #689f38);
}
.sr-share-block {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--sr-tier-divider, rgba(46, 125, 50, 0.25));
}
.sr-share-block__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sr-tier-text-strong, #1b5e20);
  margin-bottom: 0.25rem;
}
.sr-share-block__hint {
  margin: 0 0 0.5rem;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--sr-tier-muted, #689f38);
}
.sr-share-block__btns { margin-bottom: 0.45rem; }
.sr-share-block__btns .share-buttons { gap: 5px; display: flex; flex-wrap: wrap; }
.sr-share-block__btns .share-btn { width: 27px; height: 27px; border-radius: 6px; }
.sr-share-block__btns .share-btn svg { width: 15px; height: 15px; }
.sr-share-block__url {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--sr-tier-badge-border, rgba(46, 125, 50, 0.25));
  border-radius: 8px;
  background: var(--sr-tier-badge-bg, rgba(46, 125, 50, 0.08));
  color: var(--sr-tier-muted, #689f38);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .shared-ride-trip-card {
    padding: 0.9rem 0.95rem !important;
  }
  .group-excursion-trip-card--has-cover {
    padding-top: 0 !important;
  }
  .group-excursion-trip-card__cover {
    height: 72px;
    width: calc(100% + 1.9rem);
    margin: 0 -0.95rem 0.65rem;
  }
  .group-excursion-trip-card__foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .shared-ride-trip-card__cta {
    width: auto;
    max-width: 100%;
  }
}

/* Kill leftover trains-section-head chrome if an old cached partial still uses it */
.group-excursion-offers-section > .trains-section-head,
.transport-shared-rides-section > .trains-section-head {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    margin: 0 0 0.55rem !important;
    padding: 0 !important;
}
