/* bridge: Excel row -> data packet -> Quickbase record */
.bridge { width: 100%; padding: 12px 10px 14px; font-family: var(--sans); }
.bridge-xl, .bridge-qb { background: #fff; color: #1f1f1f; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 50px -28px #000, 0 0 0 1px rgba(255,255,255,.06); }

/* Excel window */
.bridge-xl-bar { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; background: #107C41; color: #fff; }
.bridge-xl-bar svg { width: 15px; height: 15px; flex: none; }
.bridge-xl-bar b { font-size: 11.5px; font-weight: 500; letter-spacing: -.005em; }
.bridge-xl-bar small { font-size: 10px; opacity: .7; }
.bridge-dots { margin-left: auto; display: flex; gap: 5px; } .bridge-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.4); }
.bridge-fx { display: flex; align-items: center; height: 22px; border-bottom: 1px solid #D9D9D9; background: #F6F6F6; font-size: 10.5px; }
.bridge-ref { width: 44px; text-align: center; border-right: 1px solid #D9D9D9; line-height: 22px; font-family: var(--mono); font-size: 10px; color: #444; }
.bridge-fx em { padding: 0 9px; font-family: var(--serif); font-style: italic; color: #8a8a8a; font-size: 12px; }
.bridge-fv { color: #1f1f1f; white-space: nowrap; }
.bridge-xr { position: relative; display: grid; grid-template-columns: 26px .8fr 1.3fr 1.35fr 1fr; height: 22px; font-size: 11px; transition: background .4s; }
.bridge-xr > span { display: flex; align-items: center; padding: 0 8px; border-right: 1px solid #E3E3E3; border-bottom: 1px solid #E3E3E3; white-space: nowrap; overflow: hidden; min-width: 0; }
.bridge-xr > span:nth-last-of-type(1) { border-right: 0; }
.bridge-rn { justify-content: center; padding: 0 !important; background: #F1F1F1; color: #6e6e6e; font-size: 9.5px; font-family: var(--mono); transition: background .3s, color .3s; }
.bridge-ch { height: 17px; } .bridge-ch > span { justify-content: center; background: #F1F1F1; color: #6e6e6e; font-size: 9.5px; font-family: var(--mono); }
.bridge-hd > span:not(.bridge-rn) { font-weight: 600; background: #E8F3EC; color: #0B5A2E; }
.bridge-xr.sel { background: #EEF7F1; } .bridge-xr.sel .bridge-rn { background: #CBE6D5; color: #0B5A2E; }
.bridge-cell { position: relative; }
.bridge-cell.edit { box-shadow: inset 0 0 0 2px #107C41; background: #fff; overflow: visible; }
.bridge-cell.edit::after { content: ''; width: 1px; height: 12px; background: #1f1f1f; margin-left: 1px; animation: bridge-caret .8s steps(2) infinite; }
@keyframes bridge-caret { 50% { opacity: 0; } }
.bridge-tick { position: absolute; right: 7px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #107C41; display: grid; place-items: center; opacity: 0; transform: scale(.4); transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s; }
.bridge-tick svg { width: 10px; height: 10px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bridge-xr.sent .bridge-tick { opacity: 1; transform: none; }
.bridge-xr.ask, .bridge-xr.ask.sel { background: #FFF4D9; } .bridge-xr.ask .bridge-rn { background: #F7DD9B; color: #7a5600; }
.bridge-xr.ask .bridge-cell { color: #8a5d00; }

/* connector */
.bridge-band { position: relative; height: 84px; }
.bridge-wire { position: absolute; left: calc(50% - 1px); top: 0; bottom: 0; width: 2px; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.32) 0 4px, transparent 4px 9px); animation: bridge-flow .9s linear infinite; }
@keyframes bridge-flow { to { background-position: 0 9px; } }
.bridge-branch { position: absolute; left: 50%; top: 41px; height: 2px; width: calc(50% - 176px); margin-left: 26px; background: repeating-linear-gradient(to right, rgba(245,185,66,.5) 0 4px, transparent 4px 9px); }
.bridge-bot { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; z-index: 3; box-shadow: 0 10px 24px -10px #000; }
.bridge-bot .aria { margin-top: -3px; }
.bridge-sync { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 9px; color: var(--mute); }
.bridge-sync svg { width: 18px; height: 18px; fill: none; stroke: var(--dim); stroke-width: 1.7; stroke-linecap: round; flex: none; }
.bridge-sync b { display: block; font-size: 12px; font-weight: 500; color: var(--ink); letter-spacing: -.005em; white-space: nowrap; }
.bridge-sync small { display: block; font-size: 10.5px; font-family: var(--mono); color: var(--dim); white-space: nowrap; }
.bridge-person { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 150px; display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 11px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); transition: border-color .5s, background .5s, box-shadow .5s; }
.bridge-av { width: 26px; height: 26px; border-radius: 50%; background: #5B5B66; color: #fff; font-size: 9.5px; font-weight: 600; display: grid; place-items: center; flex: none; transition: background .5s; }
.bridge-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.bridge-person b { display: block; font-size: 12px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.bridge-person small { display: block; font-size: 10.5px; color: var(--dim); white-space: nowrap; transition: color .5s; }
.bridge-person.on { border-color: rgba(245,185,66,.55); background: var(--amber-bg); box-shadow: 0 0 26px -4px rgba(245,185,66,.45); }
.bridge-person.on .bridge-av { box-shadow: 0 0 0 2px #C98A12; } .bridge-person.on small { color: var(--amber); }

.bridge-pk { --dx: 140px; position: absolute; left: 50%; top: 0; z-index: 2; height: 22px; padding: 0 10px 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; background: #fff; color: #14532d; font-family: var(--mono); font-size: 10px; white-space: nowrap; box-shadow: 0 0 0 1px #107C41, 0 8px 18px -6px rgba(16,124,65,.7); opacity: 0; transform: translate(-50%, -16px) scale(.85); transition: transform .75s var(--ease), opacity .35s ease; }
.bridge-pk::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: #107C41; }
.bridge-pk-ask { color: #7a5600; box-shadow: 0 0 0 1px #E0A21B, 0 8px 18px -6px rgba(224,162,27,.7); } .bridge-pk-ask::before { background: #E0A21B; }
.bridge-pk.s1 { opacity: 1; transform: translate(-50%, 1px); }
.bridge-pk.s2 { transform: translate(-50%, 31px); transition: transform .6s var(--ease); }
.bridge-pk.s3 { transform: translate(-50%, 66px) scale(.9); opacity: 0; transition: transform 1.1s cubic-bezier(.55,0,.3,1), opacity .3s ease .85s; }
.bridge-pk-ask.s3 { transform: translate(calc(-50% + var(--dx)), 31px) scale(.9); transition: transform .7s var(--ease), opacity .3s ease .45s; }

/* Quickbase window */
.bridge-tb { height: 126px; }
.bridge-qb-bar { display: flex; align-items: center; gap: 14px; height: 32px; padding: 0 12px; border-bottom: 1px solid #E7E5E2; }
.bridge-logo { display: inline-flex; align-items: center; gap: 5px; } .bridge-logo svg { width: 11.25px; height: 15px; }
.bridge-logo b { font-size: 14px; font-weight: 700; letter-spacing: -.035em; color: #363432; line-height: 1; padding-bottom: 2px; }
.bridge-nav { display: flex; gap: 12px; font-size: 11px; color: #77736e; height: 100%; }
.bridge-nav span { display: flex; align-items: center; border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
.bridge-nav .on { color: #363432; font-weight: 600; border-bottom-color: #2C9382; }
.bridge-qb-bar small { margin-left: auto; font-size: 10.5px; color: #77736e; white-space: nowrap; } .bridge-qb-bar small b { font-family: var(--mono); font-weight: 500; color: #363432; }
.bridge-qr { position: relative; display: grid; grid-template-columns: .9fr .8fr 1.2fr 1.1fr 1.3fr; align-items: center; height: 26px; padding: 0 12px; font-size: 11px; border-bottom: 1px solid #EFEDEA; white-space: nowrap; transition: background 1.6s ease; }
.bridge-qr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bridge-qr > span:first-child { font-family: var(--mono); font-size: 10px; color: #2C7A6E; }
.bridge-qh { height: 22px; background: #F6F5F3; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: #77736e; font-weight: 500; }
.bridge-qh > span:first-child { font-family: var(--sans); font-size: 9.5px; color: #77736e; }
.bridge-qr:last-child { border-bottom: 0; }
.bridge-mod { color: #77736e; display: flex !important; align-items: center; gap: 6px; }
.bridge-mod u { text-decoration: none; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #0B6B3C; background: #CFF3DF; border-radius: 4px; padding: 2px 5px; }
.bridge-st { display: inline-flex; align-items: center; height: 16px; padding: 0 7px; border-radius: 99px; font-size: 9.5px; font-weight: 600; }
.bridge-st-sold, .bridge-st-active { background: #D6F2E2; color: #0B6B3C; }
.bridge-st-reserved { background: #E4ECF7; color: #2B558F; }
.bridge-st-inactive { background: #ECEAE7; color: #77736e; }
.bridge-new { height: 0; opacity: 0; border-bottom-width: 0; overflow: hidden; background: #D9F5E5; transition: height .6s var(--ease), opacity .5s ease .1s, background 2.4s ease .8s; }
.bridge-new.on { height: 26px; opacity: 1; border-bottom-width: 1px; background: #F3FBF6; }
.bridge-old > span { transition: opacity .5s; } .bridge-old:not(.on) > span:not(.bridge-swap):not(.bridge-mod) { opacity: .5; }
.bridge-swap { position: relative; height: 16px; } .bridge-swap .bridge-st { position: absolute; left: 0; top: 0; transition: opacity .45s, transform .45s var(--ease); }
.bridge-swap .bridge-st-active { opacity: 0; transform: translateY(8px); }
.bridge-old.on .bridge-st-inactive { opacity: 0; transform: translateY(-8px); } .bridge-old.on .bridge-st-active { opacity: 1; transform: none; }
.bridge-old .bridge-mod u { display: none; } .bridge-old.on .bridge-mod u { display: inline; } .bridge-old.on .bridge-mod s { display: none; }
.bridge-old .bridge-mod s { text-decoration: none; opacity: .6; }
.bridge-old.on { animation: bridge-flash 2.6s ease-out; }
@keyframes bridge-flash { 0%, 25% { background: #D9F5E5; } 100% { background: #fff; } }

.bridge-out { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 14px; font-size: 14.5px; letter-spacing: -.01em; color: var(--ink); opacity: 0; transform: translateY(8px); transition: opacity .7s var(--ease), transform .7s var(--ease); text-align: center; }
.bridge-out.on { opacity: 1; transform: none; }
.bridge-out i { width: 20px; height: 20px; border-radius: 50%; background: var(--ok-bg); display: grid; place-items: center; flex: none; }
.bridge-out svg { width: 13px; height: 13px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) {
  .bridge { padding: 8px 4px 12px; }
  .bridge-hm { display: none !important; }
  .bridge-xr { grid-template-columns: 24px .8fr 1.5fr 1fr; font-size: 10.5px; }
  .bridge-xr > span { padding: 0 6px; }
  .bridge-qr { grid-template-columns: .8fr .8fr 1fr 1.3fr; padding: 0 9px; font-size: 10.5px; }
  .bridge-qb-bar { gap: 10px; padding: 0 9px; }
  .bridge-sync svg { display: none; } .bridge-sync b { font-size: 10.5px; } .bridge-sync small { font-size: 9.5px; }
  .bridge-person { width: 112px; padding: 0 8px; gap: 7px; height: 40px; } .bridge-av { width: 22px; height: 22px; font-size: 8.5px; }
  .bridge-person b { font-size: 11px; } .bridge-person small { font-size: 9.5px; }
  .bridge-bot { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .bridge-branch { width: calc(50% - 112px - 24px); margin-left: 24px; }
  .bridge-pk { --dx: 96px; font-size: 9px; padding: 0 7px 0 6px; }
  .bridge-out { font-size: 13.5px; }
}
