/* One selection foundation for the employee workspace and the separate customer portal. */
label,.fields>*,.device-control{min-width:0}select{contain:paint;max-width:100%;min-width:0;min-height:44px;color-scheme:inherit;direction:inherit;line-height:1.4}select,select option,select optgroup{color:var(--fg);background-color:var(--panel)}select option:disabled{color:var(--muted)}select:focus-visible{outline:3px solid var(--focus,var(--accent));outline-offset:2px}.crm-lookup-search{min-width:0;max-width:100%}
.crm-selection-popup{position:fixed;inset:auto;margin:0;padding:0;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--fg);box-shadow:0 12px 32px #0003;z-index:1000;overflow:auto;overscroll-behavior:contain;text-align:start;direction:rtl;max-width:calc(100vw - 24px)}.crm-selection-popup[hidden]{display:none!important}.crm-selection-popup [role=option]{width:100%;min-height:46px;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 14px;background:var(--panel);color:var(--fg);text-align:start;justify-content:flex-start;white-space:normal;overflow-wrap:anywhere}.crm-selection-popup [role=option]:hover,.crm-selection-popup [role=option][aria-selected=true]{background:var(--panel2,var(--soft));color:var(--fg)}.crm-selection-popup .hint{padding:12px 14px;margin:0}.crm-selection-popup .popup-more{display:flex;width:100%;border-radius:0;justify-content:center;border:0;border-top:1px solid var(--line)}.crm-selection-popup [role=option] bdi{white-space:nowrap}.crm-selection-popup [role=option]:focus-visible{outline:3px solid var(--focus,var(--accent));outline-offset:-3px}
.ticket-secondary-actions{display:flex;align-items:center;gap:10px}.ticket-secondary-actions>button{min-height:44px}.ticket-context-controls{display:flex;align-items:center;min-width:0}.ticket-context-controls details{padding:0;border:0;min-width:0;width:100%}.ticket-context-controls summary.button{min-height:44px;font-size:inherit;list-style:none}.ticket-context-controls summary.button::-webkit-details-marker{display:none}.ticket-context-controls details[open]>summary{margin-bottom:0}.ticket-context-controls summary.button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.ticket-context-controls .crm-selection-popup{min-width:min(220px,calc(100vw - 24px));padding:6px}.ticket-context-controls .crm-selection-popup button{width:100%;justify-content:flex-start;margin:0;background:var(--panel);color:var(--fg);border:0}.ticket-context-controls .crm-selection-popup button:hover{background:var(--panel2)}.ticket-context-controls .actions{gap:4px;display:grid}
/* Header theme controls must not reintroduce transparent native-control surfaces. */
#appearance,#portal-appearance{background-color:var(--panel);color:var(--fg);min-height:44px;color-scheme:inherit}
.crm-date-hint{display:block;color:var(--muted);font-size:.8125rem;font-weight:400;line-height:1.5;white-space:normal;overflow-wrap:anywhere}.crm-date-hint bdi{white-space:nowrap}input[type=date],input[type=datetime-local]{max-width:100%;min-width:0}
@media(max-width:800px){.ticket-primary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.ticket-primary-actions>form:not(.ticket-stop){width:auto;min-width:0}.ticket-primary-actions>button,.ticket-primary-actions>form>button{width:100%;min-width:0}.ticket-primary-actions>.ticket-stop{grid-column:1/-1;width:100%}.ticket-secondary-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.ticket-secondary-actions>button,.ticket-secondary-actions summary.button{width:100%;min-width:0}}

/* Context menus need a readable width independent of a short trigger label.
   The positioning utility clamps the preferred width to the visual viewport. */
.crm-selection-popup[data-crm-menu-panel]{--crm-popup-min-width:288px;padding:6px;min-width:0}.crm-selection-popup[data-crm-menu-panel] button{width:100%;justify-content:flex-start;margin:0;border:0;background:var(--panel);color:var(--fg)}.crm-selection-popup[data-crm-menu-panel] button:hover{background:var(--panel2,var(--soft))}.crm-selection-popup[data-crm-menu-panel] .actions{display:grid;gap:4px}
