/* KitrumHub shared layer: loaded after static_components.css on every page.
   Holds design tokens and the components shared by the chooser, Gamification and Training. */

:root {
    color-scheme: light;  /* light-only design: keep native inputs/selects light in dark-mode browsers */
    --hub-ink: #000000;
    --hub-paper: #ffffff;
    --hub-paper-soft: #F7F7F7;
    --hub-line: #E6E6E6;
    --hub-text-muted: #666666;   /* was #808080 (3.9:1); #666 passes WCAG AA on white */
    --hub-accent: #22C6CA;       /* KIT coin teal */
    --hub-danger: #be0202;
    --hub-radius-pill: 50px;
    --hub-radius-card: 16px;
    --hub-font: 'SuisseIntl Regular', 'Helvetica Neue', Arial, sans-serif;
    --hub-font-medium: 'SuisseIntl Medium', 'Helvetica Neue', Arial, sans-serif;
}

/* Header: let the right-hand action area grow to fit the tool switch button */
.nav-menu {
    width: auto;
    min-width: 200px;
}
.site-menu {
    flex: 1;
    width: auto;
}

.tool-switch {
    font-family: var(--hub-font-medium);
    font-size: 14px;
    white-space: nowrap;
    color: var(--hub-ink);
    text-decoration: none;
    border: 1px solid var(--hub-ink);
    border-radius: var(--hub-radius-pill);
    padding: 0 16px;
    min-height: 36px !important;
    transition: background-color .15s, color .15s;
}
.tool-switch:hover {
    background: var(--hub-ink);
    color: var(--hub-paper);
}
@media screen and (max-width: 968px) {
    .nav-menu { min-width: 0; }
    .nav-menu .tool-switch { display: none; }
}

/* Elements converted from div/span to real buttons keep their old look */
#open-mobile-menu,
#scroll-to-top {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
#open-mobile-menu { text-decoration: underline; }

a.sign-in-btn {
    text-decoration: none;
    color: white;
}

/* Visible keyboard focus everywhere (several inputs set outline: none) */
:focus-visible {
    outline: 2px solid var(--hub-accent) !important;
    outline-offset: 2px;
}

/* Text should be selectable; static_components.css disables it on every span */
span { user-select: text; }

.text-grey { color: var(--hub-text-muted); }

/* ---------- Tool chooser (kitrumhub.com) ---------- */
.chooser {
    padding: 64px 0 120px;
}
.chooser-title {
    margin-bottom: 12px;
}
.chooser-lead {
    color: var(--hub-text-muted);
    margin-bottom: 48px;
    display: block;
}
.chooser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.chooser-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 12px 24px;
    border-radius: var(--hub-radius-card);
    background: var(--hub-paper);
    border: 1px solid var(--hub-line);
    transition: box-shadow .2s, transform .2s;
}
.chooser-card:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.chooser-card > :not(.chooser-card-art) { margin-left: 12px; margin-right: 12px; }
.chooser-card-art {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 220;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #050505;
}
.chooser-grid.is-single { grid-template-columns: minmax(0, 440px); }
.chooser-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media screen and (max-width: 1100px) { .chooser-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chooser-card-eyebrow {
    font-family: var(--hub-font-medium);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hub-text-muted);
}
.chooser-card-title {
    margin-top: 0;
    font-family: var(--hub-font-medium);
    font-weight: 400;
    font-size: 18px;
    line-height: 25px;
    color: var(--hub-ink);
    margin-bottom: 4px;
}
.chooser-card-stat {
    font-family: var(--hub-font-medium);
    font-size: 14px;
    line-height: 20px;
    min-height: 20px;
    color: #2E9E94;
    margin-bottom: 12px;
}
.chooser-card-cta {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: var(--hub-radius-pill);
    background: var(--hub-ink);
    color: var(--hub-paper);
    text-decoration: none;
    font-family: var(--hub-font-medium);
    font-size: 14px;
    line-height: 18px;
}
.chooser-card-cta:hover { opacity: .85; }
.profile-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 18px;
    font-size: 14px;
}
.profile-chip span:last-child { color: var(--hub-text-muted); }

@media screen and (max-width: 968px) {
    .chooser { padding: 32px 0 64px; }
    .chooser-grid { grid-template-columns: 1fr; }
    .profile-chip { display: none; }
}

/* Login / error pages */
.login-error {
    max-width: 480px;
    margin: 24px auto 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fdecec;
    color: var(--hub-danger);
    text-align: center;
}
.error-home-link {
    display: block;
    margin-top: 24px;
    text-align: center;
    color: var(--hub-ink);
}

.dev-login-form { display: flex; flex-direction: column; gap: 12px; }
.dev-login-form input[type="email"] {
    padding: 14px 16px;
    border: 1px solid var(--hub-line);
    border-radius: 12px;
    font: inherit;
}

/* Filter chips are real buttons now; keep the old chip look */
button.filter-box {
    border: 0;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.card-item-name a { color: inherit; text-decoration: none; }
.card-item.clickable:focus-visible { border-radius: 12px; }
.product-title { margin: 0; font-weight: inherit; }
button.buy-button { border: 0; font: inherit; cursor: pointer; width: 100%; }
button.buy-button:disabled { opacity: .7; cursor: default; }
button.cancel-purchase { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- M2 polish: mobile overflow, popups, fonts ---------- */
@font-face { font-family: 'SuisseIntl Regular'; font-display: swap; src: url('../fonts/SuisseIntl-Regular.woff2') format('woff2'); }
@font-face { font-family: 'SuisseIntl Medium'; font-display: swap; src: url('../fonts/SuisseIntl-Medium.woff2') format('woff2'); }

.notification-popup { width: auto; max-width: min(520px, 90vw); }

@media screen and (max-width: 968px) {
    /* Cart summary kept min-width: 350px and overflowed 375px phones */
    .cart-summary { min-width: 0; width: 100%; box-sizing: border-box; margin-left: 0; }
    /* Popups: min-width 560px / square aspect ratio don't fit phones */
    .popup-box { min-width: 0; width: 92vw; aspect-ratio: auto; max-height: 90vh; }
    .popup-box-inside { max-height: calc(90vh - 10px); overflow-y: auto; }
}

/* ---------- Platform feedback (footer link, both apps): same form as the training feedback ---------- */
.pf-page { padding: 48px 0 80px; max-width: 720px; }
.pf-head { margin-bottom: 32px; }
.pf-head h1 { margin: 0 0 12px; }
.pf-form { display: flex; flex-direction: column; gap: 24px; max-width: 640px; }
.pf-stars { border: 0; padding: 0; margin: 0; }
.pf-stars legend { font-size: 19px; line-height: 26px; font-family: var(--hub-font-medium); margin-bottom: 12px; padding: 0; }
.pf-stars-row { display: inline-flex; flex-direction: row-reverse; gap: 6px; }
.pf-stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-stars-row label { font-size: 40px; line-height: 1; color: #D6D6D2; cursor: pointer; transition: color .1s; }
.pf-stars-row label:hover, .pf-stars-row label:hover ~ label, .pf-stars-row input:checked ~ label { color: #F2B705; }
.pf-stars-row input:focus-visible + label { outline: 2px solid #2E9E94; outline-offset: 2px; border-radius: 4px; }
.pf-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pf-field { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 20px; }
.pf-field textarea { font: inherit; font-size: 16px; line-height: 24px; padding: 12px 14px; border: 1px solid #CFCFCB;
  border-radius: 12px; background: #fff; color: #0E0E0E; resize: vertical; }
.pf-field textarea:focus { outline: 2px solid #2E9E94; outline-offset: 1px; }
.pf-required { color: #C62828; }
.pf-error { margin: 0; color: #B23A2D; }
.pf-btn { box-sizing: border-box; align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 32px; border: 0; border-radius: 999px; background: #0E0E0E; color: #fff !important; font: inherit;
  font-size: 16px; line-height: 20px; text-decoration: none; cursor: pointer; }
.pf-btn:hover { opacity: .85; }
.pf-btn:disabled { opacity: .4; cursor: default; background: #0E0E0E !important; }
.pf-thanks { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 28px; border-radius: 20px; background: #E8F3EE; }
.pf-thanks p { margin: 0; }
.pf-thanks .pf-btn { margin-top: 8px; }

/* ---------- Header: profile popup (Training, Email Signature) ---------- */
.tr-profile { position: relative; display: flex; align-items: center; }
.tr-profile-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0;
  border-radius: 50%; background: transparent; cursor: pointer; transition: background .15s; }
.tr-profile-btn:hover, .tr-profile-btn[aria-expanded="true"] { background: #F2F2F0; }
.tr-profile-btn:focus-visible { outline: 2px solid var(--hub-ink); outline-offset: 2px; }
.tr-profile-pop { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: 300px; box-sizing: border-box; padding: 20px;
  background: #fff; border: 1px solid #ECECEA; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .14); text-align: left; }
.tr-profile-pop[hidden] { display: none; }
.tr-profile-who { display: flex; align-items: center; gap: 14px; }
.tr-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--kt-teal-soft, #E4F6F4); color: var(--kt-teal-deep, #2E9E94); font: 18px/1 var(--hub-font-medium, inherit); }
.tr-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tr-avatar-initials[hidden] { display: none; }
.tr-profile-names { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-profile-name { font: 16px/22px var(--hub-font-medium, inherit); color: var(--hub-ink); }
.tr-profile-email { font-size: 13px; line-height: 18px; color: var(--hub-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-profile-facts { margin: 18px 0; padding: 14px 0 0; border-top: 1px solid #ECECEA; display: flex; flex-direction: column; gap: 10px; }
.tr-profile-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 20px; }
.tr-profile-facts dt { color: var(--hub-text-muted); }
.tr-profile-facts dd { margin: 0; color: var(--hub-ink); font-family: var(--hub-font-medium, inherit); text-align: right; }
.tr-profile-hub { display: flex; width: 100%; box-sizing: border-box; align-items: center; justify-content: center; padding: 12px 24px;
  border-radius: 999px; background: var(--hub-ink); color: #fff !important; text-decoration: none; font: 15px/20px var(--hub-font-medium);
  letter-spacing: .06em; transition: opacity .15s; }
.tr-profile-hub:hover { opacity: .85; }
.tr-profile-link { display: flex; width: 100%; box-sizing: border-box; align-items: center; justify-content: center; margin-bottom: 8px;
  padding: 11px 24px; border: 1px solid var(--hub-ink); border-radius: 999px; background: #fff; color: var(--hub-ink) !important;
  text-decoration: none; font: 15px/20px var(--hub-font-medium); transition: background .15s, color .15s; }
.tr-profile-link:hover { background: #ECECEA; }
@media (max-width: 560px) {
  .tr-profile-pop { position: fixed; top: 68px; left: 16px; right: 16px; width: auto; }
}
