/* Apps menu: "Apps" in the nav opens a panel listing the five apps (same design as the Tipo redesign artifact) */

/* Keep the open panel above the hero content while the nav sits in its slot */
.nav:not(.is-stuck) { position: relative; z-index: 30; }
/* The hero card clips its corners; let the open panel hang past it on short page heroes */
.hero__card:has(.apps-menu.is-open) { overflow: visible; }

.apps-menu { position: relative; }
.apps-menu__btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px 7px 14px; border-radius: 999px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; transition: background-color 0.2s, color 0.2s;
}
.apps-menu__btn:hover, .apps-menu.is-open .apps-menu__btn { background: var(--card); color: var(--ink); }
.apps-menu__chev { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.apps-menu.is-open .apps-menu__chev { transform: rotate(180deg); }

.apps-panel {
  position: absolute; z-index: 60; top: calc(100% + 14px); left: 50%; translate: -50% 0;
  display: none; width: min(640px, calc(100vw - 32px)); padding: 10px; border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow-md), 0 0 0 1px var(--line); text-align: left;
}
.apps-menu.is-open .apps-panel { display: block; animation: drop 0.25s var(--ease); }
.apps-panel__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }

.nav__links .app-link {
  display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px; border-radius: 16px;
  color: var(--ink); font-size: 15px; transition: background-color 0.2s;
}
.nav__links .app-link:hover, .nav__links .app-link:focus-visible { background: var(--violet-50); }
.app-link__ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.app-link__ico img { width: 100%; height: 100%; object-fit: cover; }
.app-link__txt { display: grid; gap: 1px; min-width: 0; }
.app-link__txt b { font-weight: 600; line-height: 1.25; }
.app-link__txt small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.app-link__new { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 600; vertical-align: 0.15em; }

/* Sixth cell: all Tipo apps on the Shopify App Store */
.nav__links .app-link--all { justify-content: space-between; background: var(--panel); color: var(--ink-2); font-weight: 600; }
.nav__links .app-link--all:hover { background: var(--violet-100); color: var(--violet); }
.app-link--all .ico { width: 18px; height: 18px; }

@media (max-width: 48rem) {
  .apps-menu__btn { width: 100%; justify-content: space-between; padding: 12px 14px; border-radius: 14px; font-size: 16px; }
  .apps-menu.is-open .apps-menu__btn { background: var(--panel); }
  .apps-panel { position: static; translate: none; width: auto; padding: 4px 0 6px; border-radius: 0; background: transparent; box-shadow: none; }
  .apps-menu.is-open .apps-panel { animation: none; }
  .apps-panel__list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .nav__links .app-link { padding: 8px 10px; }
  .app-link__ico { width: 38px; height: 38px; border-radius: 12px; }
}

@keyframes drop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }

/* Used by the app pages (Related Products): line icons on a tint, the current page, links in app cards */
.nav__links .app-link[aria-current="page"] { background: var(--violet-50); box-shadow: inset 0 0 0 1px var(--violet-200); }
.app-link__ico .ico { width: 22px; height: 22px; }
.app-ico--booking { background: var(--violet-100); color: var(--violet); }
.app-ico--upsell { background: #FFF1C2; color: #7A5600; }
.app-ico--auction { background: #FDE0DB; color: #A3301F; }
.app-ico--sync { background: #D4F4FB; color: #0B5F73; }
.app-ico--backup { background: #D3F5E6; color: #0E6B47; }
.app-link__ico--logo { background: none; }
.bcard__link { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.3s var(--ease), color 0.2s; }
.bcard__link:hover, .bcard__link:focus-visible { color: var(--violet); background-size: 100% 1.5px; }
@media (max-width: 48rem) { .app-link__ico .ico { width: 19px; height: 19px; } }
