/* Carta Pronta — dropdown personalizado (site e painel). Par do assets/js/cp-select.js */
.cps { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.cps__native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0; opacity: 0; pointer-events: none; }

.cps__btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 0; text-align: left; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.cps__btn:not(.pill) { height: 44px; padding: 0 14px 0 16px; border: 1px solid var(--line-2, #d5dcea); border-radius: 12px; background: #fff; color: var(--ink, #0A1733); font-size: 14.5px; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.cps__lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cps__chev { flex: none; width: 14px; height: 14px; color: var(--muted, #6b7690); transition: transform 220ms cubic-bezier(.23, 1, .32, 1), color 160ms ease; }
.cps.is-open .cps__chev { transform: rotate(180deg); color: var(--blue, #005CFF); }
@media (hover: hover) and (pointer: fine) { .cps__btn:not(.pill):not(:disabled):hover { border-color: #b9c4da; } }
.cps__btn:not(.pill):focus-visible, .cps.is-open .cps__btn:not(.pill) { outline: none; border-color: var(--blue, #005CFF); box-shadow: 0 0 0 4px var(--blue-100, #d3e2ff); }
.cps__btn:disabled { opacity: .55; cursor: default; }

/* status em pílula (painel) */
.cps__btn.pill { width: auto; gap: 6px; padding-right: 8px; cursor: pointer; }
.cps__btn.pill .cps__chev { width: 12px; height: 12px; color: currentColor; opacity: .75; }
.cps__btn.pill:focus-visible, .cps.is-open .cps__btn.pill { outline: 2px solid currentColor; outline-offset: 2px; }

/* lista */
.cps-pop { position: fixed; z-index: 2147483000; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid var(--line, #e6ebf3); border-radius: 16px; background: #fff; color: var(--ink, #0A1733); box-shadow: 0 2px 4px rgba(10, 23, 51, .04), 0 24px 48px -16px rgba(10, 23, 51, .32); font-family: inherit; outline: none; scrollbar-width: thin; scrollbar-color: #c9d2e3 transparent; transform-origin: top center; }
.cps-pop[hidden] { display: none; }
.cps-pop.is-cima { transform-origin: bottom center; }
.cps-pop.is-in { animation: cpsIn 180ms cubic-bezier(.23, 1, .32, 1); }
@keyframes cpsIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.cps-pop.is-cima.is-in { animation-name: cpsInCima; }
@keyframes cpsInCima { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.cps-pop__op { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; line-height: 1.3; cursor: pointer; user-select: none; transition: background-color 120ms ease, color 120ms ease; }
.cps-pop__op + .cps-pop__op { margin-top: 2px; }
.cps-pop__op.is-ativo { background: var(--blue-50, #eef3ff); }
.cps-pop__op[aria-selected="true"] { color: var(--blue, #005CFF); font-weight: 500; }
.cps-pop__op[aria-disabled="true"] { opacity: .45; cursor: default; }
.cps__check { flex: none; width: 16px; height: 16px; color: var(--blue, #005CFF); opacity: 0; transform: scale(.6); transition: opacity 160ms ease, transform 200ms cubic-bezier(.23, 1, .32, 1); }
.cps-pop__op[aria-selected="true"] .cps__check { opacity: 1; transform: none; }
.cps-pop--pill .cps-pop__op { font-size: 14px; }
@media (pointer: coarse) { .cps-pop__op { min-height: 46px; font-size: 15.5px; } }
@media (prefers-reduced-motion: reduce) { .cps-pop.is-in { animation: none; } .cps__chev, .cps__check { transition: none; } }

/* encaixes do site */
.results__sort .cps { display: block; }
.results__sort .cps__btn:not(.pill) { border-radius: 999px; padding: 0 16px 0 18px; font-weight: 500; }
@media (max-width: 640px) { .results__sort .cps { width: 100%; } }

/* encaixes do painel */
.field .cps { display: block; width: 100%; }
.field.is-err .cps__btn { border-color: var(--bad, #e0384b); background: #fffafa; }
.map__row .cps { display: block; min-width: 0; }
.map__row .cps__btn:not(.pill) { height: 38px; border-radius: 10px; padding: 0 10px 0 12px; font-size: 14px; }
.map__row .cps__btn.is-set { border-color: var(--blue, #005CFF); color: var(--blue, #005CFF); font-weight: 500; }
.cps__btn.input { width: 100%; }
@media (max-width: 640px) {
  .toolbar > .cps { flex: 1 1 100%; width: 100% !important; }
  .cps__btn.pill { height: 32px; font-size: 12.5px; padding-right: 6px; }
  .cps__btn:not(.pill) { font-size: 16px; }
}

/* campo com sugestões (<input list>) */
.cpc { position: relative; display: block; }
.cpc > input { padding-right: 44px !important; }
.cpc__chev { position: absolute; right: 16px; top: 50%; translate: 0 -50%; display: grid; place-items: center; pointer-events: none; }
.cpc.is-open .cps__chev { transform: rotate(180deg); color: var(--blue, #005CFF); }
.cpc-pop mark { background: none; color: var(--blue, #005CFF); font-weight: 600; }
