/* Latbase design system · components · v1. Requires tokens.css and base.css. */

/* navigation: the wordmark left, the five site links in a centred pill (Home, Discover, Leads, Micro Events, Contact us), the product's own actions right. Shared by every Latbase site. */
.nav { position: relative; height: 80px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); background: var(--paper); }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 36px; width: auto; display: block; }
.nav-pill { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 6px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); }
.nav-pill a, .nav-pill button { display: inline-flex; align-items: center; height: 36px; padding: 0 20px; border-radius: var(--radius-pill); font-family: inherit; font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--ink); white-space: nowrap; background: none; border: 0; cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.nav-pill a:hover, .nav-pill button:hover { background: var(--paper-2); }
.nav-pill .on, .nav-pill [aria-current="page"] { background: var(--paper-2); }
@media (min-width: 1280px) { .nav-pill { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } }
.nav-right { display: flex; align-items: center; gap: var(--space-3); min-height: 40px; }
.nav-text { font-size: var(--text-small); font-weight: var(--weight-medium); padding: 0 6px; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: var(--weight-semibold); display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; cursor: pointer; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.iconbtn:hover { border-color: var(--line-strong); }
.nav-menu-btn { display: none; }
/* the menus that drop from the avatar and from the phone menu button */
.nav-menu-wrap { position: relative; }
.nav-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; min-width: 220px; padding: 6px; margin: 0; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-hover); }
.nav-menu li a, .nav-menu li button { display: flex; width: 100%; align-items: center; padding: 10px 12px; border-radius: 10px; font-family: inherit; font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; white-space: nowrap; }
.nav-menu li a:hover, .nav-menu li button:hover { background: var(--paper-2); }
.nav-menu li.sep { height: 1px; margin: 6px 8px; background: var(--line); }
@media (max-width: 1023px) { .nav-pill { display: none; } .nav-menu-btn { display: inline-flex; } .nav-right .nav-desktop { display: none; } }
@media (max-width: 767px) { .nav { height: 64px; } .logo img { height: 28px; } }

/* the contact dialog: opened by "Contact us" everywhere; two ways to reach us and a line for everything else */
.dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: rgba(17, 17, 17, 0.4); backdrop-filter: blur(4px); }
.dialog { position: relative; width: 100%; max-width: 460px; padding: var(--space-8); border-radius: var(--radius-card); background: var(--paper); box-shadow: 0 28px 80px -20px rgba(0, 0, 0, 0.24), 0 10px 32px -12px rgba(0, 0, 0, 0.14); outline: none; display: flex; flex-direction: column; gap: var(--space-5); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.dialog-head .h3 { margin-top: 6px; }
.dialog-close { border-color: transparent; margin: -6px -8px 0 0; }
.dialog-close:hover { background: var(--paper-2); border-color: transparent; }
.dialog-options { display: flex; flex-direction: column; gap: var(--space-3); }
.option { display: flex; align-items: center; gap: var(--space-4); width: 100%; padding: var(--space-4); border-radius: var(--radius-tile); border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: left; font-family: inherit; cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.option:hover { background: var(--paper-2); }
.option-icon { width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--paper-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--dur-fast) var(--ease); }
.option:hover .option-icon { background: var(--paper); }
.option-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.option-title { font-size: var(--text-small); font-weight: var(--weight-medium); }
.option-detail { font-size: var(--text-caption); color: var(--ink-2); }
.option-arrow { color: var(--ink-3); flex-shrink: 0; transition: transform var(--dur-fast) var(--ease); }
.option:hover .option-arrow { transform: translateX(2px); }
/* Google Calendar's scheduling button is created here, hidden, and clicked by our own option */
.gcal-host { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (max-width: 767px) { .dialog { padding: var(--space-6); border-radius: 20px; } }

/* buttons, chips, pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-h); padding: 0 22px; border-radius: var(--radius-pill); font-size: var(--text-small); font-weight: var(--weight-medium); border: 1px solid transparent; white-space: nowrap; transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: #000; color: var(--on-ink); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: var(--paper-2); color: var(--ink); }
.btn-ghost:hover { background: #ebebef; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: var(--chip-h); padding: 0 14px; border-radius: var(--radius-pill); background: var(--paper-2); font-size: var(--text-caption); font-weight: var(--weight-medium); color: var(--ink); white-space: nowrap; border: 1px solid transparent; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.chip:hover { background: #ebebef; }
.chip.on, .chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.chip-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-h-sm); padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--paper); font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--ink); white-space: nowrap; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.pill:hover { border-color: var(--ink); }
.pill.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.reason { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid rgba(17, 17, 17, 0.12); font-size: var(--text-eyebrow); font-weight: var(--weight-medium); color: var(--ink); white-space: nowrap; }
.tag { position: absolute; left: 14px; top: 14px; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.92); font-size: var(--text-eyebrow); font-weight: var(--weight-medium); display: inline-flex; align-items: center; color: var(--ink); backdrop-filter: saturate(1.2); }

/* inputs */
.search { display: flex; align-items: center; gap: var(--space-3); height: var(--search-h); padding: 0 20px 0 22px; border-radius: var(--radius-pill); background: var(--paper-2); font-size: var(--text-body); color: var(--ink-2); position: relative; transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.search:focus-within { background: var(--paper); box-shadow: 0 0 0 1.5px var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--ink); font-size: inherit; }
.search input::placeholder { color: var(--ink-2); }
.search-sm { height: var(--control-h-sm); font-size: var(--text-small); padding: 0 16px 0 18px; }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--text-small); font-weight: var(--weight-medium); }
.input { height: var(--control-h); padding: 0 16px; border-radius: var(--radius-input); border: 1px solid var(--line-strong); background: var(--paper); font-size: var(--text-body); outline: none; transition: border-color var(--dur-fast) var(--ease); }
.input:focus { border-color: var(--ink); }

/* cards */
.card { display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius-card); transition: transform var(--dur) var(--ease); }
.card:hover { transform: translateY(var(--lift)); }
.card:hover .media { box-shadow: var(--shadow-hover); }
.media { aspect-ratio: 4 / 3; border-radius: var(--radius-media); overflow: hidden; position: relative; background: var(--paper-2); transition: box-shadow var(--dur) var(--ease); }
.media > svg, .media > img { width: 100%; height: 100%; }
.media > img { object-fit: cover; filter: saturate(0.9) contrast(1.04); }
.media-hero { aspect-ratio: 16 / 7; border-radius: var(--radius-card); }
.card-text { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.card-text .h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: var(--text-small); color: var(--ink-2); }
.reasons { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* compact card: image left, text right */
.mini { display: flex; gap: var(--space-4); align-items: center; padding: 14px; border-radius: var(--radius-tile); border: 1px solid var(--line); transition: border-color var(--dur-fast) var(--ease), transform var(--dur) var(--ease); }
.mini:hover { border-color: var(--line-strong); transform: translateY(var(--lift)); }
.mini .media { width: 120px; height: 90px; aspect-ratio: auto; flex-shrink: 0; border-radius: 14px; }
.mini-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-title { font-size: var(--text-body); font-weight: var(--weight-semibold); letter-spacing: -0.01em; }
.mini-empty { justify-content: center; border-style: dashed; color: var(--ink-2); font-size: var(--text-small); min-height: 72px; }

/* shelves: title row plus a rail that scrolls sideways with snap */
.shelf { display: flex; flex-direction: column; gap: var(--space-6); }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.shelf-head > div { display: flex; flex-direction: column; gap: 6px; }
.seeall { font-size: var(--text-small); font-weight: var(--weight-medium); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rail { display: flex; gap: var(--card-gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; margin-bottom: -4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 calc((100% - 3 * var(--card-gap)) / 4); scroll-snap-align: start; }
@media (max-width: 1199px) { .rail > * { flex-basis: calc((100% - 2 * var(--card-gap)) / 3); } }
@media (max-width: 899px) { .rail > * { flex-basis: calc((100% - var(--card-gap)) / 2); } }
@media (max-width: 599px) { .rail > * { flex-basis: 78%; } }
/* rails on phones bleed to the screen edge */
@media (max-width: 767px) { .rail-bleed { margin-left: calc(-1 * var(--page-margin)); margin-right: calc(-1 * var(--page-margin)); padding-left: var(--page-margin); padding-right: var(--page-margin); scroll-padding-left: var(--page-margin); } }

/* tiles and the glance strip */
.tile { padding: var(--space-6); border-radius: var(--radius-tile); background: var(--paper-2); display: flex; flex-direction: column; gap: var(--space-2); }
.tile-outline { background: var(--paper); border: 1px solid var(--line); }
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.glance > div { padding: var(--space-6) var(--space-6) var(--space-6) 0; display: flex; flex-direction: column; gap: 6px; }
.glance > div + div { padding-left: var(--space-6); border-left: 1px solid var(--line); }
.glance .value { font-size: var(--text-body); font-weight: var(--weight-semibold); }
@media (max-width: 899px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } .glance > div:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } .glance > div:nth-child(4) { border-top: 1px solid var(--line); } }
@media (max-width: 599px) { .glance { grid-template-columns: 1fr; } .glance > div { padding-left: 0 !important; border-left: 0 !important; } .glance > div + div { border-top: 1px solid var(--line); } }

/* the week strip: seven day columns, one bar per event spanning its days */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-day { font-size: var(--text-caption); font-weight: var(--weight-medium); color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.week-day b { font-size: var(--text-body); font-weight: var(--weight-semibold); color: var(--ink); }
.week-day.today b { text-decoration: underline; text-underline-offset: 4px; }
.bar { height: 40px; border-radius: var(--radius-bar); display: flex; align-items: center; padding: 0 12px; font-size: var(--text-caption); font-weight: var(--weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-main { background: var(--bar-figure, var(--ocean)); color: var(--on-ink); }
.bar-inside { background: var(--bar-ground, var(--ocean-ground)); color: var(--bar-figure, var(--ocean)); }
.bar-around { background: var(--bar-ground, var(--teal-ground)); color: var(--bar-figure, var(--teal)); }
.legend { display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
@media (max-width: 767px) { .week-wrap { overflow-x: auto; } .week { min-width: 700px; } }

/* footer: the wordmark and the company line, four columns of links, the legal line. Shared by every Latbase site. */
.footer { border-top: 1px solid var(--line); padding-top: var(--space-16); padding-bottom: var(--space-10); display: flex; flex-direction: column; gap: var(--space-12); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.footer-top .logo img { height: 32px; }
.footer-tagline { font-size: var(--text-body); color: var(--ink); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col .footer-head { font-size: var(--text-caption); font-weight: var(--weight-medium); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.footer-col a, .footer-col span, .footer-col .footer-link { font-size: var(--text-small); color: var(--ink); }
.footer-col .footer-link { background: none; border: 0; padding: 0; font-family: inherit; text-align: left; cursor: pointer; }
.footer-col a:hover, .footer-col .footer-link:hover { color: var(--ink-2); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: var(--space-6); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-caption); color: var(--ink-3); }
@media (max-width: 767px) { .footer { padding-top: var(--space-12); padding-bottom: var(--space-8); gap: var(--space-10); } .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8) var(--space-6); } .footer-top .logo img { height: 26px; } }
