/* Vendored copy of the shared dropdown and calendar components, renamed pk- so no page names the platform; the pack look is appended at the end. Re-copy and rename if the originals change. */
/* PK Select — shared custom dropdown component (floating border label + custom option panel).
   Progressively enhances any <select data-pk-select> via pk-select.js. Reuses the same
   "label punches the border" technique proven in account-settings.css .acm-legend: an absolutely
   positioned label with a background matching the box, not a native <legend>. */
.pk-select{position:relative}
/* The native select sits underneath .pk-select-box (opacity 0, purely for
   accessibility/keyboard support). It must carry NO visible chrome of its own
   — otherwise its square corners (default browser border) peek out past the
   box's rounded corners, showing as stray dashes at each corner. */
.pk-select-native{position:absolute;inset:0;opacity:0;pointer-events:none;
  border:0;outline:0;background:none;-webkit-appearance:none;appearance:none}

.pk-select-box{position:relative;display:flex;align-items:center;gap:8px;
  border:1.5px solid var(--pk-tint);border-radius:14px;background:#fff;
  padding:14px 40px 14px 14px;cursor:pointer;min-height:20px;box-sizing:border-box}
html.ic-dark .pk-select-box{background:#0f1430;border-color:rgba(255,255,255,.12)}
.pk-select.is-open .pk-select-box{border-color:var(--pk-content-blue);outline:none}
.pk-select.is-disabled .pk-select-box{opacity:.55;cursor:not-allowed}
.pk-select.is-disabled .pk-select-input{cursor:not-allowed}

.pk-select-label{position:absolute;top:0;left:12px;transform:translateY(-50%);
  background:#F8FAFF;padding:0 6px;font-size:11.5px;font-weight:700;color:var(--pk-content-blue);
  white-space:nowrap}
html.ic-dark .pk-select-label{background:#0f1430}
/* A control given no aria-label/.set-lbl (per field-label-above-never-floating-
   border-label) still renders this span, empty - and its padding alone paints a
   stray notch over the border. Hide it rather than leaving that behind. */
.pk-select-label:empty{display:none}
.pk-select-req{color:#d64545}

.pk-select-input{font-size:14px;color:var(--pk-charcoal);flex:1;min-width:0;
  border:0;outline:0;background:transparent;padding:0;font-family:inherit;cursor:text}
html.ic-dark .pk-select-input{color:#e6e8f2}
.pk-select-input::placeholder{color:var(--pk-muted)}

.pk-select-caret{color:var(--pk-muted);font-size:12px;position:absolute;right:14px;top:50%;
  transform:translateY(-50%);transition:transform .15s ease;pointer-events:none}
.pk-select.is-open .pk-select-caret{transform:translateY(-50%) rotate(180deg)}

/* position:fixed (coordinates computed in JS from the box's getBoundingClientRect) so the panel
   escapes any ancestor's overflow:hidden/auto clipping — e.g. the account-settings modal body,
   which scrolls its own content and would otherwise crop the panel at the modal's edge.
   Bounded + scrollable (fixed 2026-07-17): a fixed-position element is out of document flow, so
   it does NOT grow page scroll height — a long option list (e.g. the 80+ PH provinces, or any
   city/barangay list) used to overflow straight past the viewport edge with no way to reach the
   rest, not even by scrolling the page. max-height + overflow-y:auto makes the PANEL itself
   scrollable instead of relying on page scroll that never actually reaches it. */
.pk-select-panel{display:none;position:fixed;z-index:1060;
  background:#fff;border:1px solid var(--pk-tint);border-radius:12px;box-shadow:var(--shadow-card);
  padding:6px;max-height:min(320px,calc(100vh - 80px));overflow-y:auto}
html.ic-dark .pk-select-panel{background:#1a1f3d;border-color:rgba(255,255,255,.10)}
.pk-select.is-open .pk-select-panel{display:block}

.pk-select-opt{padding:10px 12px;font-size:14px;border-radius:8px;cursor:pointer;
  color:var(--pk-charcoal)}
html.ic-dark .pk-select-opt{color:#e6e8f2}
.pk-select-opt:hover{background:var(--pk-ice)}
html.ic-dark .pk-select-opt:hover{background:rgba(255,255,255,.06)}
.pk-select-opt.is-selected{background:var(--pk-tint);font-weight:600;color:var(--pk-content-blue)}
html.ic-dark .pk-select-opt.is-selected{background:rgba(140,150,255,.15)}
/* <optgroup> header — a non-interactive divider inside the filter panel.
   Only grouped selects emit these; ungrouped ones never render one. */
.pk-select-group{padding:9px 12px 4px;font-size:11px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;color:var(--pk-muted);
  cursor:default;user-select:none}
.pk-select-group:not(:first-child){margin-top:4px;border-top:1px solid rgba(10,14,40,.08);
  padding-top:9px}
html.ic-dark .pk-select-group{color:#8b93b0}
html.ic-dark .pk-select-group:not(:first-child){border-top-color:rgba(255,255,255,.10)}
.pk-select-opt.is-disabled{color:var(--pk-muted);cursor:default}

/* ── Hover bubble for [data-pk-tip] targets ──────────────────────────────────────
   Rendered by pk-select.js into ONE <body>-level node, so it is never clipped
   by the option panel or a modal body. Placement is TOP (bubble above, arrow
   centred on its bottom edge pointing down at the row); .at-bottom is the
   viewport-clip fallback and simply moves the arrow to the top edge.

   PK Blue on light. On DARK the bubble goes PK gold with blue text — a blue
   bubble sits too close to the dark surface behind it to read as a floating
   layer. This is floating chrome, like a modal head bar, so neither theme is
   the dark-mode content-blue flip (PK Blue SOP); the gold/blue pairing is the
   platform's existing one (see .ml-new / .ml-lock .pad in media-card.css). */
.pk-tip{position:fixed;z-index:1200;max-width:270px;padding:8px 11px;border-radius:9px;
  background:#1A237E;color:#fff;font-size:12px;line-height:1.45;font-weight:600;
  box-shadow:0 8px 22px rgba(15,18,38,.30);pointer-events:none;
  opacity:0;visibility:hidden;transition:opacity .12s ease,transform .12s ease}
.pk-tip.at-top{transform:translateY(3px)}
.pk-tip.at-bottom{transform:translateY(-3px)}
.pk-tip.is-on{opacity:1;visibility:visible;transform:translateY(0)}
/* A rotated square rather than a border triangle, so it inherits the bubble's
   own background and stays correct if the colour is ever re-themed. Its `left`
   is set in JS to track the target's centre. */
.pk-tip-arrow{position:absolute;width:10px;height:10px;margin-left:-5px;
  background:#1A237E;transform:rotate(45deg);border-radius:2px}
.pk-tip.at-top .pk-tip-arrow{bottom:-4px}
.pk-tip.at-bottom .pk-tip-arrow{top:-4px}
.pk-tip-text{position:relative;z-index:1}
/* Dark mode: gold ground, PK Blue text. The arrow must be flipped alongside
   the bubble or it stays blue and reads as a stray dot under a gold box. */
html.ic-dark .pk-tip{background:var(--pk-gold);color:#1A237E;
  box-shadow:0 8px 22px rgba(0,0,0,.45)}
html.ic-dark .pk-tip-arrow{background:var(--pk-gold)}
/* PK Date — custom calendar dropdown matching the PK Select combobox look (pk-select.css):
   same floating-border-label box, same panel chrome, same fixed positioning technique so it
   escapes ancestor overflow clipping (e.g. the account-settings modal body). */
.pk-date{position:relative}
.pk-date-native{position:absolute;inset:0;opacity:0;pointer-events:none}

.pk-date-box{position:relative;display:flex;align-items:center;gap:8px;
  border:1.5px solid var(--pk-tint);border-radius:14px;background:#fff;
  padding:14px 40px 14px 14px;cursor:pointer;min-height:20px;box-sizing:border-box}
html.ic-dark .pk-date-box{background:#0f1430;border-color:rgba(255,255,255,.12)}
.pk-date.is-open .pk-date-box{border-color:var(--pk-content-blue);outline:none}
/* Locked field (the native input carries `disabled`) — the hidden native input's
   own :disabled styling never shows, so the greyed-out affordance lives here.
   Matches .pk-select.is-disabled in pk-select.css. */
.pk-date.is-disabled .pk-date-box{opacity:.55;cursor:not-allowed}

.pk-date-label{position:absolute;top:0;left:12px;transform:translateY(-50%);
  background:#F8FAFF;padding:0 6px;font-size:11.5px;font-weight:700;color:var(--pk-content-blue);
  white-space:nowrap}
html.ic-dark .pk-date-label{background:#0f1430}

.pk-date-value{font-size:14px;color:var(--pk-charcoal);flex:1;min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.ic-dark .pk-date-value{color:#e6e8f2}
.pk-date.is-empty .pk-date-value{color:var(--pk-muted)}

.pk-date-ic{color:var(--pk-muted);font-size:14px;position:absolute;right:14px;top:50%;
  transform:translateY(-50%);pointer-events:none}

.pk-date-panel{display:none;position:fixed;z-index:1060;width:270px;
  background:#fff;border:1px solid var(--pk-tint);border-radius:12px;box-shadow:var(--shadow-card);
  padding:12px}
html.ic-dark .pk-date-panel{background:#1a1f3d;border-color:rgba(255,255,255,.10)}
.pk-date.is-open .pk-date-panel{display:block}

.pk-date-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.pk-date-month{font-weight:700;font-size:13.5px;color:var(--pk-charcoal)}
html.ic-dark .pk-date-month{color:#eef0fb}
.pk-date-zoom{cursor:pointer;border-radius:6px;padding:2px 6px;margin:0 -6px}
.pk-date-zoom:hover{background:var(--pk-ice);color:var(--pk-content-blue)}
html.ic-dark .pk-date-zoom:hover{background:rgba(255,255,255,.06)}
.pk-date-nav{border:0;background:var(--pk-ice);color:var(--pk-content-blue);width:26px;height:26px;
  border-radius:8px;cursor:pointer;font-size:11px}
html.ic-dark .pk-date-nav{background:rgba(255,255,255,.06)}
.pk-date-nav:hover{background:var(--pk-tint)}

.pk-date-week{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;
  font-size:11px;font-weight:700;color:var(--pk-muted);margin-bottom:4px}

.pk-date-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.pk-date-cell{border:0;background:transparent;border-radius:8px;padding:7px 0;font-size:13px;
  color:var(--pk-charcoal);cursor:pointer;text-align:center}
html.ic-dark .pk-date-cell{color:#e6e8f2}
.pk-date-cell.is-blank{cursor:default}
.pk-date-cell:not(.is-blank):hover{background:var(--pk-ice)}
html.ic-dark .pk-date-cell:not(.is-blank):hover{background:rgba(255,255,255,.06)}
.pk-date-cell.is-selected{background:var(--pk-content-blue);color:#fff;font-weight:700}
.pk-date-cell.is-today:not(.is-selected){color:var(--pk-content-blue);font-weight:700}

/* Month picker (12 cells) and year picker (12 cells, one 12-year page) — same
   grid used by both "zoomed out" levels so the panel width never changes. */
.pk-date-mgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.pk-date-mcell{border:0;background:transparent;border-radius:8px;padding:11px 0;font-size:13px;
  font-weight:600;color:var(--pk-charcoal);cursor:pointer;text-align:center}
html.ic-dark .pk-date-mcell{color:#e6e8f2}
.pk-date-mcell:hover{background:var(--pk-ice)}
html.ic-dark .pk-date-mcell:hover{background:rgba(255,255,255,.06)}
.pk-date-mcell.is-selected{background:var(--pk-content-blue);color:#fff;font-weight:700}
.pk-date-mcell.is-today:not(.is-selected){color:var(--pk-content-blue);font-weight:700}

.pk-date-foot{display:flex;justify-content:space-between;margin-top:10px;padding-top:10px;
  border-top:1px solid var(--pk-tint)}
html.ic-dark .pk-date-foot{border-color:rgba(255,255,255,.08)}
.pk-date-link{border:0;background:transparent;color:var(--pk-content-blue);font-size:12.5px;
  font-weight:700;cursor:pointer;padding:2px 4px}
.pk-date-link:hover{text-decoration:underline}

/* Pack look: the same overrides the funnel pages apply to the dropdown box, renamed. */
.pk-select-input:focus-visible{outline:none}
.pk-select-label{display:none}
.pk-select-box{border-radius:12px;padding:12px 40px 12px 14px;transition:border-color .15s,box-shadow .15s}
.pk-select-box:focus-within{border-color:var(--color-primary-600);box-shadow:0 0 0 4px #21790026}
.pk-select-input{color:var(--color-ink-900);background:0 0;border:0;padding:0;font-size:16px;line-height:24px}
.pk-select-caret{color:var(--color-ink-500)}
.pk-select-caret i{display:none}
.pk-select-caret:before{content:"";background:currentColor;width:14px;height:14px;display:block;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") 50%/contain no-repeat}
.pk-select.is-invalid .pk-select-box{border-color:#c0392b}
.pk-select-opt{font-size:15px}
.pk-select-input[readonly]{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}
.pk-select-input[readonly]::selection{background:transparent}
.pk-select-opt.is-active{background:var(--pk-ice)}
