/* * Font del Bosc — Trànsit. Front-end styles (.fdbt- BEM). * Simple bordered cards, generous spacing, quiet hierarchy. */ .fdbt { --fdbt-radius: 10px; --fdbt-border: #d8dde3; --fdbt-hairline: #eef1f4; --fdbt-text: #24292f; --fdbt-muted: #57606a; --fdbt-ok: #1a7f37; --fdbt-warn: #9a6700; --fdbt-danger: #cf222e; --fdbt-link: #0969da; margin: 1.75rem 0; font-size: 0.95rem; color: var(--fdbt-text); } .fdbt :focus-visible { outline: 2px solid var(--fdbt-link); outline-offset: 2px; border-radius: 4px; } /* Section header */ .fdbt__title { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1.25rem; font-size: 1.25rem; line-height: 1.25; } .fdbt-count { color: var(--fdbt-muted); font-size: 0.85rem; font-weight: 400; } .fdbt__scope { color: var(--fdbt-muted); font-size: 1.05rem; font-weight: 500; } /* Empty and unavailable states */ .fdbt__empty { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.9rem 1.1rem; border: 1px solid #cdebd8; border-radius: var(--fdbt-radius); color: var(--fdbt-ok); font-weight: 600; } .fdbt__empty--unavailable { border-color: #ecdcab; color: var(--fdbt-warn); } .fdbt-empty__icon { display: inline-flex; flex: 0 0 auto; } /* Grid: air between cards */ .fdbt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; } /* Card */ .fdbt-card { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.15rem 1.25rem 1.05rem; border: 1px solid var(--fdbt-border); border-radius: var(--fdbt-radius); background: #fff; transition: border-color 0.15s ease; } .fdbt-card:hover, .fdbt-card:focus-within { border-color: #9ea9b5; } .fdbt-card--c15 { border-left: 4px solid #d4a017; } .fdbt-card--zbe { border-left: 4px solid #3f9c63; } /* Quiet header: type on the left, status on the right */ .fdbt-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 22px; } .fdbt-card__type { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; } .fdbt-type--works { color: #1a56b0; } .fdbt-type--accident { color: #b3261e; } .fdbt-type--congestion { color: #b25e09; } .fdbt-type--obstruction { color: #a04a00; } .fdbt-type--weather { color: #0b6e4f; } .fdbt-type--assistance { color: #6b21a8; } .fdbt-type--management, .fdbt-type--restriction, .fdbt-type--incident { color: #424d57; } .fdbt-type--zbe { color: #2e8b57; } .fdbt-icon { display: inline-flex; flex: 0 0 auto; color: inherit; } .fdbt-icon svg { display: block; } .fdbt-card__type .fdbt-icon svg { width: 18px; height: 18px; } .fdbt-card__status { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--fdbt-muted); font-size: 0.8rem; } .fdbt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fdbt-ok); } /* Body: title first, place second */ .fdbt-card__title { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.45; } .fdbt-card__place { margin: 0; color: var(--fdbt-muted); font-size: 0.9rem; line-height: 1.5; } .fdbt-card__place strong { color: var(--fdbt-text); } /* Details behind a hairline divider */ .fdbt-card__meta { margin: 0.35rem 0 0; padding: 0.7rem 0 0; border-top: 1px solid var(--fdbt-hairline); list-style: none; display: flex; flex-direction: column; gap: 0.35rem; } .fdbt-card__meta-item { display: flex; align-items: center; gap: 0.45rem; color: var(--fdbt-muted); font-size: 0.85rem; line-height: 1.4; } .fdbt-card__meta-item--impact { color: var(--fdbt-danger); font-weight: 600; } .fdbt-card__meta-item--hours { margin: 0; } .fdbt-meta__icon { display: inline-flex; flex: 0 0 auto; color: #8b949e; } .fdbt-card__link { margin: auto 0 0; padding-top: 0.5rem; font-size: 0.88rem; } .fdbt-card__link a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--fdbt-link); font-weight: 600; text-decoration: none; } .fdbt-card__link a:hover, .fdbt-card__link a:focus { text-decoration: underline; } .fdbt-link__icon { display: inline-flex; } /* ZBE: stickers as chips, hours as meta */ .fdbt-card__chips { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: 0; font-size: 0.85rem; color: var(--fdbt-muted); } .fdbt-chip { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 5px; font-size: 0.78rem; font-weight: 700; } .fdbt-chip--none { background: #eceff1; color: #52606d; } .fdbt-chip--b { background: #ffe082; color: #7a5800; } .fdbt-chip--c { background: #c8e6c9; color: #1b5e20; } .fdbt-chip--eco { background: #b2dfdb; color: #004d40; } .fdbt-chip--zero { background: #bbdefb; color: #0d47a1; } .fdbt-chip--other { background: #eceff1; color: #52606d; } .fdbt-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 5px; background: #f0f3f6; color: #424d57; font-size: 0.78rem; font-weight: 700; } /* Notice banner */ .fdbt-notice { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0 0 1.25rem; padding: 0.7rem 0.95rem; border-left: 3px solid var(--fdbt-danger); border-radius: 4px; background: #fdf6f5; } .fdbt-notice__icon { display: inline-flex; flex: 0 0 auto; color: var(--fdbt-danger); } .fdbt-notice p { margin: 0; font-size: 0.9rem; color: #6e2128; } /* Footer */ .fdbt-footer { margin-top: 1.25rem; padding-top: 0.85rem; border-top: 1px solid var(--fdbt-hairline); font-size: 0.8rem; color: var(--fdbt-muted); } .fdbt-footer__updated { margin: 0 0 0.2rem; } .fdbt-footer__source { margin: 0; } .fdbt-footer a { color: inherit; } /* Widget */ .fdbt-widget__list { list-style: none; margin: 0; padding: 0; } .fdbt-widget__item { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.55rem 0; border-bottom: 1px solid var(--fdbt-hairline); font-size: 0.88rem; } .fdbt-widget__item:last-child { border-bottom: 0; padding-bottom: 0; } .fdbt-widget__text { color: var(--fdbt-muted); } .fdbt-widget__empty { margin: 0; color: var(--fdbt-ok); font-weight: 600; } /* Motion preferences and small screens */ @media (prefers-reduced-motion: reduce) { .fdbt-card { transition: none; } } @media (max-width: 480px) { .fdbt-grid { grid-template-columns: 1fr; } }