/* The country picker of the phone field (web/phone.js): "Keep me informed" on the home, Questions and survey pages.
   The button and the number field share one row; the list opens under them. Colours only from tokens.css. */
.ph { position: relative; display: flex; align-items: stretch; width: 100%; min-width: 0; }
.ph .cap-input, .field .ph .cap-input, .i-field .ph .cap-input { flex: 1 1 auto; min-width: 0; width: auto; margin-top: 0; }
.field .ph { margin-top: var(--cap-space-2); }
.ph-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 48px; margin-right: -1px; padding: 0 8px 0 10px; border: 1px solid var(--cap-ink-60); border-radius: 0; background: var(--cap-light); color: var(--cap-ink); font: 600 15px/20px var(--cap-font-sans); cursor: pointer; white-space: nowrap; }
.field .ph-btn { min-height: 52px; }
.ph-btn:hover { background: var(--cap-white); }
.ph-btn:focus-visible { position: relative; z-index: 1; outline: none; border: 2px solid var(--cap-turquoise-deep); padding: 0 7px 0 9px; }
.ph-btn[aria-expanded="true"] { background: var(--cap-white); }
.ph-flag { font-size: 20px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
/* On the button the flag stands for the country; where flags show as two letters (Windows), the ISO code instead */
.ph-noflag .ph-flag, .ph-btn .ph-iso { display: none; }
.ph-noflag .ph-btn .ph-iso { display: inline; }
.ph-iso { font-weight: 500; color: var(--cap-slate); }
.ph-noflag .ph-btn .ph-iso { color: var(--cap-ink); font-weight: 600; }
.ph-chev { flex: none; margin-left: 2px; }
.ph:has(.cap-input[aria-invalid="true"]) .ph-btn { border-color: var(--cap-ink); }
.field.has-error .ph-btn { border-color: var(--cap-gold-deep); }
/* Under the field, from its right edge (the phone is the right-hand field of its row), at least 320 px when the screen allows */
.ph-pop { position: absolute; z-index: 30; top: 100%; right: 0; width: max(100%, min(320px, calc(100vw - 32px))); margin-top: 4px; background: var(--cap-white); border: 1px solid var(--cap-ink); }
.ph-pop[hidden] { display: none; }
.ph-search { display: block; width: 100%; min-height: 48px; margin: 0; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--cap-ink-60); border-radius: 0; background: var(--cap-white); color: var(--cap-ink); font: 500 16px/24px var(--cap-font-sans); }
.ph-search::placeholder { color: var(--cap-slate); opacity: 1; }
.ph-search:focus-visible { outline: 2px solid var(--cap-turquoise-deep); outline-offset: -2px; }
.ph-list { max-height: min(296px, 45vh); margin: 0; padding: 4px 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.ph-list[hidden] { display: none; }
.ph-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 6px 14px; color: var(--cap-ink); font: 500 15px/20px var(--cap-font-sans); cursor: pointer; }
.ph-opt[hidden] { display: none; }
.ph-opt:hover { background: var(--cap-light); }
.ph-opt.is-active { background: var(--cap-light); box-shadow: inset 3px 0 0 var(--cap-turquoise-deep); }
.ph-opt[aria-selected="true"] { font-weight: 700; }
.ph-opt.ph-last-top { border-bottom: 1px solid var(--cap-ink-60); }
.ph-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ph-code { flex: none; color: var(--cap-slate); white-space: nowrap; }
.ph-code .ph-iso { margin-right: 4px; font-size: 13px; }
.ph-none { margin: 0; padding: 12px 14px; font: var(--cap-text-small); color: var(--cap-slate); }
.ph-none:empty { display: none; }
