/*
 * PartnerContactCollector — EvoData skin, on top of the manager stylesheets
 * (styles.css + custom.css are loaded first and do the real work: Bootstrap 5
 * theme, .card radius, btn-evo pills, ti-* icons).
 *
 * Brand values live ONLY in the :root block below: the EvoData magenta of
 * www.evodata.it and of the manager (.primary-color), sampled from
 * images/loghi/logo.png, plus the near-black ink of that same logo. Every rule
 * here reads a token, so a rebrand is a five-line change.
 *
 * The rest is what a finger-driven tablet page and the two small charts need.
 */

:root {
  --pcc-brand: #d90066;           /* EvoData magenta (logo + manager .primary-color) */
  --pcc-brand-dark: #a80050;      /* hover / pressed */
  --pcc-brand-soft: #fdeaf3;      /* tinted surfaces */
  --pcc-brand-line: #f3c3d8;      /* tinted borders */
  --pcc-ink: #232323;             /* EvoData black */
  --pcc-surface: #f6f9fb;         /* manager .bg-gray */
  --pcc-muted: #7c8fac;
  --pcc-line: #e5eaef;
}

.pcc-body { background-color: var(--pcc-surface); min-height: 100vh; display: flex; flex-direction: column; }
.pcc-body > .container-fluid, .pcc-body > .pcc-login-wrap { flex: 1 0 auto; }

/* brand helpers */
.pcc-brand-color { color: var(--pcc-brand); }
.pcc-brand-bg { background-color: var(--pcc-brand); color: #fff; }
.pcc-rule { height: 3px; width: 56px; border-radius: 3px; background-color: var(--pcc-brand); }

/* magenta pill, same shape as the manager btn-evo family */
.btn-evo-brand:hover, .btn-evo-brand-active { background-color: var(--pcc-brand) !important; border-color: var(--pcc-brand) !important; color: #fff !important; font-weight: 400; }
.btn-evo-brand-active:hover { background-color: var(--pcc-brand-dark) !important; border-color: var(--pcc-brand-dark) !important; }

/* manager components re-tinted: the portal has a single accent, the brand one */
.pcc-body .evo-link { color: var(--pcc-brand); }
.pcc-body .evo-link:hover { color: var(--pcc-brand-dark); border-bottom-color: var(--pcc-brand-dark); }
.pcc-body .progress-bar { background-color: var(--pcc-brand); }
.pcc-body .ag-theme-quartz { --ag-active-color: var(--pcc-brand); --ag-selected-row-background-color: var(--pcc-brand-soft); }
.pcc-body .form-check-input:checked { background-color: var(--pcc-brand); border-color: var(--pcc-brand); }
.pcc-body .form-check-input:focus, .pcc-body .btn:focus-visible { box-shadow: 0 0 0 .2rem rgba(217, 0, 102, .2); }

/* top bar: white, magenta hairline on top, partner logo first */
.pcc-nav { position: sticky; top: 0; z-index: 1020; min-height: 64px; border-top: 3px solid var(--pcc-brand); }
.pcc-nav-logo { max-height: 44px; max-width: 150px; object-fit: contain; }
.pcc-nav-logo-partner { max-height: 52px; max-width: 220px; object-fit: contain; }
.pcc-nav-title { color: var(--pcc-ink); }

/* credit line — the owner's signature at the foot of a partner-branded page */
.pcc-credit { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: .45rem;
              padding: 14px 12px 18px; color: var(--pcc-muted); font-size: .72rem; letter-spacing: .02em; }
.pcc-credit img { height: 15px; width: auto; opacity: .85; }
.pcc-credit a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.pcc-credit a:hover img { opacity: 1; }

/* login — EvoData hero, the product is the guest here */
.pcc-body-brand { background-color: var(--pcc-ink); }
.pcc-login-wrap { min-height: auto;
                  background-image: radial-gradient(1100px 560px at 12% -10%, rgba(217, 0, 102, .55), transparent 62%),
                                    radial-gradient(820px 560px at 100% 105%, rgba(217, 0, 102, .40), transparent 60%); }
.pcc-login-card { max-width: 470px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35) !important; }
.pcc-login-logo { width: 62%; max-width: 250px; height: auto; }
.pcc-login-product { color: var(--pcc-ink); font-weight: 600; letter-spacing: .01em; }
.pcc-login-lang { position: absolute; top: 14px; right: 14px; }

/* tablet form: big targets, no accidental zoom on focus (iOS zooms below 16px) */
.pcc-collect .form-control-lg, .pcc-collect .form-select-lg { font-size: 1.15rem; min-height: 54px; }
.pcc-collect .btn-lg { min-height: 56px; }
.pcc-collect .form-control:focus, .pcc-collect .form-select:focus { border-color: var(--pcc-brand-line); box-shadow: 0 0 0 .2rem rgba(217, 0, 102, .15); }
.pcc-lookup { background-color: var(--pcc-brand-soft); border: 1px solid var(--pcc-brand-line); }
.pcc-switch .form-check-input { width: 3rem; height: 1.6rem; }
.pcc-switch .form-check-input:checked { background-color: var(--pcc-brand); border-color: var(--pcc-brand); }
.pcc-switch .form-check-label { padding-left: .6rem; padding-top: .2rem; font-size: 1.05rem; }
.pcc-consent { background-color: var(--pcc-surface); border: 2px solid transparent; }
.pcc-consent-missing { border-color: #F36058; }
.pcc-consent .btn-check:checked + .btn-outline-success { background-color: #3fc860; border-color: #3fc860; color: #fff; }
.pcc-consent .btn-check:checked + .btn-outline-danger { background-color: #F36058; border-color: #F36058; color: #fff; }

/* decrypt key */
.pcc-secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .06em;
              background-color: var(--pcc-brand-soft); border: 1px dashed var(--pcc-brand-line); border-radius: 12px; padding: 14px; word-break: break-all; }
.pcc-secret-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }

/* grids */
.pcc-grid { height: calc(100vh - 210px); min-height: 360px; width: 100%; }
.pcc-log-warning { color: #9a6700; font-weight: 500; }
.pcc-log-error { color: #c34c46; font-weight: 600; }

/* partners */
.pcc-partner-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background-color: #fff; flex: 0 0 72px; }
.pcc-partner-logo-empty { display: flex; align-items: center; justify-content: center; background-color: var(--pcc-surface); color: #B1B1B1; font-size: 1.6rem; }
.pcc-logo-box { width: 150px; height: 150px; border: 1px dashed var(--pcc-brand-line); border-radius: 16px; display: flex; align-items: center; justify-content: center; background-color: #fff; }
.pcc-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 16px; }
.pcc-api-test-result { background-color: var(--pcc-surface); border-radius: 12px; padding: 12px; font-size: .8rem; max-height: 260px; overflow: auto; }

/* statistics — columns: thin marks, rounded data end on the baseline, 2px gap */
.pcc-bars { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto; padding-top: 8px; }
.pcc-bar-col { flex: 1 0 44px; max-width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.pcc-bar { width: 60%; max-width: 40px; border-radius: 4px 4px 0 0; }
.pcc-bar-col:hover .pcc-bar { filter: brightness(.88); }
.pcc-bar-value { font-size: .78rem; color: var(--pcc-ink); margin-bottom: 2px; min-height: 1.1em; }
.pcc-bar-label { font-size: .72rem; color: var(--pcc-muted); border-top: 1px solid var(--pcc-line); width: 100%; text-align: center; padding-top: 4px; white-space: nowrap; }

/* statistics — day x hour grid: cells separated by a 2px surface gap */
.pcc-heat { border-collapse: separate; border-spacing: 2px; font-size: .8rem; }
.pcc-heat th { font-weight: 500; color: var(--pcc-muted); padding: 2px 8px; text-align: center; }
.pcc-heat tbody th { text-align: left; color: var(--pcc-ink); }
.pcc-heat td { min-width: 38px; height: 32px; text-align: center; border-radius: 4px; font-variant-numeric: tabular-nums; }
.pcc-heat td[data-tip]:hover { outline: 2px solid var(--pcc-ink); outline-offset: -2px; }
.pcc-heat-zero { background-color: #f4f6f9; }
.pcc-heat td.pcc-heat-total, .pcc-heat th.pcc-heat-total { font-weight: 600; color: var(--pcc-ink); padding-left: 12px; }
.pcc-heat-swatch { display: inline-block; width: 22px; height: 12px; border-radius: 2px; }
.pcc-tip { position: absolute; z-index: 2000; pointer-events: none; background-color: var(--pcc-ink); color: #fff; font-size: .78rem;
           padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
