/* Opt-in surfaces only. Campus never receives this class. */
.pjm-form-controls, .pjm-select-dropdown {
    --pjm-control-h: 44px;
    --pjm-form-line: #7c9588;
    --pjm-form-ink: #14241c;
    --pjm-form-bg: #fff;
    --pjm-form-muted: #61756b;
    --pjm-form-focus: #a95308;
    --pjm-check-size: 20px;
}
.pjm-form-controls :is(input,select,textarea,button,label), .pjm-select-dropdown * { box-sizing: border-box; letter-spacing: 0; }
.pjm-form-controls [hidden] { display: none !important; }
/* The existing calculator root gives this opt-in layer precedence over legacy attribute chains. */
:is(.pjm-form-controls,#pjm-calculator-app) :is(input:not([type]),input:is([type=text],[type=email],[type=password],[type=search],[type=tel],[type=url],[type=number],[type=date],[type=time],[type=month],[type=datetime-local]),select,textarea):not(:where(.ts-control input)) {
    width: 100%; min-width: 0; max-width: 100%; height: 44px; min-height: 44px; margin: 0;
    padding: 10px 12px; border: 1px solid var(--pjm-form-line); border-radius: 6px;
    background: var(--pjm-form-bg); color: var(--pjm-form-ink); box-shadow: none;
    font: 400 15px/1.4 var(--pjm-font-body, system-ui, sans-serif);
}
:is(.pjm-form-controls,#pjm-calculator-app) textarea:not([hidden]) { height: auto; min-height: 96px; resize: vertical; }
:is(.pjm-form-controls,#pjm-calculator-app) select[multiple] { height: auto; min-height: 144px; }
:is(.pjm-form-controls,#pjm-calculator-app) input[type=file] {
    width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 6px;
    border: 1px solid var(--pjm-form-line); border-radius: 6px; background: #fff; color: var(--pjm-form-ink); font: 14px/1.4 var(--pjm-font-body, system-ui, sans-serif);
}
.pjm-form-controls input[type=file]::file-selector-button { min-height: 30px; margin-right: 10px; padding: 4px 10px; border: 1px solid var(--pjm-form-line); border-radius: 4px; background: #f3f6f4; color: inherit; font: inherit; cursor: pointer; }
.pjm-form-controls input[type=color] { box-sizing: border-box; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 4px; border: 1px solid var(--pjm-form-line); border-radius: 6px; background: #fff; }
.pjm-form-controls :is(input[type=checkbox],input[type=radio]):not(:where(.payment-option input,.pjm-choice-group input,.payment-method-card input,.jm-radio-card input,.jm-checkout-method input)) { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; margin: 0; padding: 0; accent-color: #1b5e4b; }
.pjm-form-controls label:has(> :is(input[type=checkbox],input[type=radio])):not(:where(.payment-option,.pjm-choice-group label,.jm-radio-card,.jm-checkout-method)) { display: flex; align-items: center; flex-direction: row; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.pjm-form-controls :is(.form-group,.pjm-form-group,.pjm-form-field,.jm-input-group,.pjm-tp-search-query,.pjm-tp-search label,.pjm-tp-profile-form label,.pjm-tp-unav-form label) { min-width: 0; }
.pjm-form-controls :is(.form-group,.pjm-form-group,.pjm-form-field) > label:not(:has(input)) { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; text-transform: none; }
.pjm-form-controls :is(.pjm-tp-profile-form,.pjm-tp-unav-form,.pjm-tp-search) label > span:first-child { font-size: 14px; line-height: 1.4; font-weight: 600; color: #455e52; }
.pjm-form-controls .pjm-job-field > span { font-size: 14px; line-height: 1.4; font-weight: 600; }
.pjm-form-controls :is(.info-box-blue,.hint-text,.upload-actions) { overflow-wrap: anywhere; min-width: 0; }
.pjm-form-controls .info-box-blue > div { min-width: 0; }
.pjm-form-controls :is(input,textarea)::placeholder { color: var(--pjm-form-muted); opacity: 1; }
:is(.pjm-form-controls,#pjm-calculator-app) :is(input,textarea)[readonly] { background-color: #f0f4f2; color: #455e52; }
.pjm-form-controls :is(input,select,textarea,button):disabled { cursor: not-allowed; opacity: .65; }
:is(.pjm-form-controls,#pjm-calculator-app) :is(input,select,textarea):is(:user-invalid,[aria-invalid=true]) { border-color: #b42318; border-width: 2px; }
.pjm-form-controls :is(input,select,textarea,button,a,summary):focus-visible { outline: 3px solid var(--pjm-form-focus); outline-offset: 3px; box-shadow: none; }
.pjm-form-controls button:not(:where(.pjm-tp-survey-modal__backdrop,[data-pjm-controls=native])) { min-height: 44px; font-family: inherit; font-size: 14px; line-height: 1.4; letter-spacing: 0; }
.pjm-form-controls :is(.btn,.pjm-btn,.pjm-btn-primary,.pjm-btn-secondary,.ja-btn,.pjm-orders-btn,.pjm-portal-settlements__btn,button[type=submit],button[type=reset]) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box;
    width: auto; min-height: 44px; max-width: 100%; margin: 0; padding: 10px 16px; border-radius: 6px;
    font-size: 14px; font-weight: 600; line-height: 1.4; white-space: normal; text-decoration: none; box-shadow: none;
}
.pjm-form-controls :is(.pjm-btn-primary,.ja-btn-primary) { background: #1b5e4b; border-color: #1b5e4b; color: #fff; }
.pjm-form-controls :is(.pjm-btn-primary,.ja-btn-primary):hover:not(:disabled) { background: #154a3b; color: #fff; }
.pjm-form-controls .pjm-nip-field__inputs > input { flex: 1 1 auto; min-width: 0; }
.pjm-form-controls :is(.pjm-nip-field__label,.pjm-nip-field__hint,.pjm-nip-field__status) { font-size: 14px; line-height: 1.4; }
.pjm-form-controls .pjm-nip-field__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid #1b5e4b; border-radius: 6px; background: #1b5e4b; color: #fff; font: 600 14px/1.4 var(--pjm-font-body,system-ui,sans-serif); box-shadow: none; transform: none; }
.pjm-form-controls .pjm-nip-field__btn:hover:not(:disabled) { background: #154a3b; transform: none; box-shadow: none; }
.pjm-form-controls :is(.pjm-tp-icon,.pjm-tp-survey-modal__close,.pjm-or-modal__close,.pjm-pcal-event-close) { min-width: 44px; min-height: 44px; border-radius: 6px; }
.pjm-form-controls .pjm-orders-search { display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 44px; padding: 0 12px; border: 1px solid var(--pjm-form-line); border-radius: 6px; background: #fff; }
.pjm-form-controls .pjm-orders-search > .material-symbols-rounded { position: static; inset: auto; transform: none; flex: 0 0 20px; width: 20px; font-size: 20px; }
:is(.pjm-form-controls,#pjm-calculator-app) .pjm-orders-search > input { flex: 1 1 0%; width: 0; height: 42px; min-height: 42px; padding: 9px 0; border: 0; background: transparent; }
.pjm-form-controls .pjm-orders-search:focus-within { outline: 3px solid var(--pjm-form-focus); outline-offset: 3px; }
.pjm-form-controls .pjm-orders-search > input:focus-visible { outline: none; }

/* Custom lists keep the original select as the form's data source. */
.pjm-form-controls .pjm-select { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; margin: 0; font: 15px/1.4 var(--pjm-font-body,system-ui,sans-serif); }
.pjm-form-controls :is(.pjm-tp-pagi,.pjm-orders-pagi) .pjm-select { flex: 0 1 144px; width: 144px; max-width: 100%; }
.pjm-form-controls .pjm-select .ts-control { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--pjm-form-line); border-radius: 6px; background: #fff; background-image: none; color: var(--pjm-form-ink); font: inherit; box-shadow: none; text-shadow: none; }
.pjm-form-controls .pjm-select.single .ts-control { height: 44px; padding-right: 34px !important; }
.pjm-form-controls .pjm-select .ts-control > input { height: 22px !important; min-height: 0 !important; width: auto; max-width: 100%; min-width: 40px; padding: 0 !important; border: 0 !important; font: inherit; color: inherit; }
.pjm-form-controls .pjm-select.single .ts-control > .item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjm-form-controls .pjm-select.focus .ts-control { outline: 3px solid var(--pjm-form-focus); outline-offset: 3px; box-shadow: none; }
.pjm-form-controls .pjm-select.multi .ts-control { min-height: 44px; padding: 5px 8px !important; }
.pjm-form-controls .pjm-select.multi .ts-control > .item { display: inline-flex; align-items: center; max-width: 100%; margin: 0; padding: 0 0 0 8px; border: 1px solid #b2c8bc; border-radius: 4px; background: #edf5f1; background-image: none; color: #174d3d; font: inherit; white-space: normal; overflow-wrap: anywhere; box-shadow: none; text-shadow: none; }
.pjm-form-controls .pjm-select.multi .ts-control > .item.active { background: #dcece4; border-color: #1b5e4b; }
.pjm-form-controls .pjm-select .item > .pjm-select-remove { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: 0 0 0 6px; padding: 0; border: 0; border-left: 1px solid #b2c8bc; border-radius: 0 3px 3px 0; background: transparent; color: inherit; cursor: pointer; }
.pjm-form-controls .pjm-select-remove .material-symbols-rounded { font-size: 18px; line-height: 1; }
.pjm-form-controls .pjm-select.disabled .ts-control { background: #f0f4f2; opacity: .65; }
.pjm-form-controls .pjm-select-invalid .ts-control { border: 2px solid #b42318; }
.pjm-form-controls .pjm-field-error { display: block; margin-top: 6px; color: #922c32; font-size: 14px; line-height: 1.4; }
.pjm-select-dropdown { z-index: 1000020; box-sizing: border-box; margin: 0; padding: 4px; border: 1px solid var(--pjm-form-line); border-radius: 6px; background: #fff; color: var(--pjm-form-ink); font: 15px/1.4 var(--pjm-font-body,system-ui,sans-serif); box-shadow: 0 6px 18px #14241c1a; }
.pjm-select-dropdown .ts-dropdown-content { overscroll-behavior: contain; scroll-behavior: auto; }
.pjm-select-dropdown .option { display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border-radius: 4px; overflow-wrap: anywhere; white-space: normal; }
.pjm-select-dropdown .option.active { background: #edf5f1; color: #174d3d; }
.pjm-select-dropdown .option.selected { font-weight: 600; }
.pjm-select-dropdown .option input[type=checkbox] { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: #1b5e4b; pointer-events: none; }
.pjm-select-dropdown :is(.no-results,.optgroup-header) { padding: 10px 12px; font-size: 14px; }
.pjm-select-dropdown .no-results { color: var(--pjm-form-muted); }
.pjm-select-dropdown .highlight { background: #f5e6ae; color: #14241c; }
.pjm-form-controls .pjm-select .ts-control > input:focus { outline: none !important; }
@media (max-width:600px) {
    :is(.pjm-form-controls,#pjm-calculator-app) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]), .pjm-form-controls .pjm-select, .pjm-select-dropdown { font-size: 16px; }
    .pjm-form-controls .pjm-select .item > .pjm-select-remove { flex-basis: 44px; width: 44px; min-height: 44px; height: 44px; }
}
