/* Shared mobile workspace. Served after legacy styles. */
[hidden] { display: none !important; }
#content { margin: 0; }
.nexin-account-toggle, #nexin-mobile-queues { display: none; }
.nexin-ticket-mobile-actions { display: none; }
.nexin-ticket-section { margin: 12px 0; }
.nexin-ticket-section > summary { padding: 14px 16px; border: 1px solid #d7e3ed; border-radius: 10px; background: white; color: #164667; font: 700 14px/1.5 'Segoe UI', sans-serif; cursor: pointer; }
.nexin-ticket-section[open] > summary { margin-bottom: 12px; }
.nexin-install-dialog { box-sizing: border-box; width: min(440px, calc(100% - 32px)); max-height: 85vh; padding: 26px; border: 0; border-radius: 20px; color: #17324b; background: white; box-shadow: 0 20px 80px #071b3355; font: 16px/1.5 'Segoe UI', sans-serif; }
.nexin-install-dialog::backdrop { background: #071b3399; }
.nexin-install-dialog h2 { margin: 0; font-size: 24px; line-height: 1.15; }
.nexin-install-dialog li { padding: 6px 0; }
.nexin-install-note { color: #526578; font-size: 14px; }
.nexin-install-dialog button { width: 100%; min-height: 48px; border: 0; border-radius: 10px; background: #082068; color: white; font: 600 16px 'Segoe UI', sans-serif; cursor: pointer; }
.nexin-login-install { display: block; margin: 16px auto 0; min-height: 44px; border: 1px solid #bac9d7; border-radius: 10px; padding: 10px 16px; background: white; color: #17324b; font: inherit; }
.nexin-connection-notice { position: fixed; z-index: 100001; bottom: 0; left: 0; right: 0; padding: 14px max(18px, env(safe-area-inset-left)) calc(14px + env(safe-area-inset-bottom)); background: #fff0c5; border-top: 1px solid #cf9c30; color: #5d4000; font: 600 15px/1.4 'Segoe UI', sans-serif; text-align: center; }
.nexin-options-toggle { display: block; margin: 12px 0; min-height: 44px; cursor: pointer; text-align: left; }
.nexin-assign-self { margin: 8px 0 0; min-height: 44px; padding: 8px 14px; border: 1px solid #bfd7e7; border-radius: 8px; background: #ecf7fc; color: #0b507e; font-weight: 700; cursor: pointer; }
.nexin-quick-create:not(.nexin-show-options) .nexin-optional-row { display: none !important; }
.nexin-topic-label { display: block; padding: 0 0 8px; }
.nexin-topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.nexin-topic-chips button { flex: 1 1 140px; min-height: 48px; padding: 12px; background: #f3f7fb; border: 1px solid #cbd7e4; border-radius: 11px; color: #17324b; font: 600 14px/1.3 'Segoe UI', sans-serif; cursor: pointer; }
.nexin-topic-chips button[aria-pressed=true] { background: #082068; border-color: #082068; color: white; box-shadow: inset 0 0 0 2px #8fe4c1; }
.nexin-topic-chips button:focus-visible { outline: 3px solid #118a9d; outline-offset: 2px; }
.nexin-topic-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; opacity: 0; clip-path: inset(50%); }
.nexin-table-scroll { max-width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
body.nexin-scp .nexin-is-creating .nexin-mobile-new-ticket,
body.nexin-scp.nexin-is-creating .nexin-mobile-new-ticket,
body.nexin-scp.nexin-is-reading .nexin-mobile-new-ticket,
body.nexin-keyboard-open .nexin-mobile-new-ticket { display: none !important; }
body.nexin-scp #nexin-staff-ticket-form { max-width: 1080px; margin: auto; }
body.nexin-scp #nexin-staff-ticket-form .form_table { table-layout: auto; }
body.nexin-scp .nexin-staff-open-intro__eyebrow { color: #b3f3e8; font-size: 11px; }
body.nexin-scp .nexin-form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding: 14px 0; }
body.nexin-scp .nexin-form-actions input { min-height: 48px; }

@media (max-width: 1024px) {
    html, body { min-width: 0 !important; }
    body.nexin-scp #container { width: 100% !important; min-width: 0 !important; margin: 0 !important; }
    body.nexin-scp #content { padding: 16px; min-width: 0; overflow: visible; box-sizing: border-box; }
    body.nexin-scp #header { display: flex; flex-wrap: wrap; align-items: center; height: auto; min-height: 68px; border-radius: 0; padding: 0 16px; }
    body.nexin-scp #header #logo { height: 68px; flex: 1 1 auto; }
    body.nexin-scp #header #logo img { max-width: 125px; }
    body.nexin-scp #header #info { display: none; order: 3; width: 100% !important; max-width: 100% !important; margin: 0 0 12px !important; text-align: left; box-sizing: border-box; }
    body.nexin-scp.nexin-account-open #header #info { display: block; }
    body.nexin-scp #header .nexin-account-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; color: #fff; background: #ffffff18; border-color: #ffffff40; font-size: 13px; }
    body.nexin-scp #nav { display: flex; overflow-x: auto; flex-wrap: nowrap; box-sizing: border-box; }
    body.nexin-scp #nav > li { flex: 0 0 auto; }
    body.nexin-scp #sub_nav.nexin-desktop-subnav { display: none; }
    body.nexin-scp #nexin-mobile-queues { display: block; background: #fff; border-bottom: 1px solid #dae4ee; padding: 10px 16px; }
    #nexin-mobile-queues label { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: #526578; }
    #nexin-mobile-queues select { flex: 1; min-width: 0; min-height: 44px; padding: 8px; font-size: 16px; }
    body.nexin-scp .dialog { position: fixed !important; inset: 16px !important; margin: 0 !important; transform: none !important; width: auto !important; min-width: 0 !important; max-width: none !important; height: auto !important; max-height: calc(100dvh - 32px) !important; overflow: auto !important; box-sizing: border-box; }
    body.nexin-scp .dialog .body { padding: 16px; max-width: 100%; box-sizing: border-box; }
    body.nexin-scp .dialog table, body.nexin-scp .dialog input { max-width: 100%; }
    body.nexin-scp .sticky.bar, body.nexin-scp .sticky.bar.fixed { position: relative !important; top: auto !important; left: auto !important; width: 100% !important; margin: 0; box-sizing: border-box; }
    body.nexin-scp .sticky.placeholder { display: none !important; }
    body.nexin-scp .sticky.bar .content { width: 100% !important; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    body.nexin-scp .sticky.bar .pull-right { float: none; display: flex; flex-wrap: wrap; gap: 5px; }
    body.nexin-scp input:not([type=checkbox]):not([type=radio]):not([type=hidden]), body.nexin-scp select, body.nexin-scp textarea { min-height: 44px; box-sizing: border-box; max-width: 100%; font-size: 16px; }
    body.nexin-scp .select2-container { width: 100% !important; max-width: 100%; }
    body.nexin-scp .select2-selection { min-height: 44px; }
    body.nexin-scp .select2-selection__rendered { line-height: 42px !important; }
    body.nexin-scp .select2-selection__arrow { height: 42px !important; }
    body.nexin-scp .redactor-toolbar { display: flex; flex-wrap: wrap; height: auto !important; }
    body.nexin-scp .redactor-editor { min-height: 170px !important; font-size: 16px; }
    body.nexin-scp .redactor-in { min-height: 170px !important; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
    body.nexin-scp .redactor-toolbar a { min-width: 40px; min-height: 44px; box-sizing: border-box; }
    body.nexin-scp .redactor-box, body.nexin-scp .filedrop, body.nexin-scp .filedrop .files { max-width: 100%; box-sizing: border-box; }
    body.nexin-scp #footer { max-width: 100%; box-sizing: border-box; }
}

@media (max-width: 760px) {
    .nexin-ticket-mobile-actions { display: flex; gap: 8px; margin: 12px 0; }
    .nexin-ticket-mobile-actions button { flex: 1; min-height: 48px; background: #0b6ca8; border: 1px solid #0b6ca8; border-radius: 10px; color: white; font: 700 15px 'Segoe UI', sans-serif; cursor: pointer; }
    .nexin-ticket-mobile-actions button + button { background: white; color: #0b5b8c; }
    body:not(.nexin-scp) .nexin-sitebar { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
    body:not(.nexin-scp) .nexin-sitebar > span { display: none; }
    body:not(.nexin-scp) .nexin-sitebar .nexin-install-app { width: auto; flex-shrink: 0; }
    body:not(.nexin-scp) #header { flex-direction: row; align-items: center; justify-content: space-between; min-height: 92px; padding: 0 16px; gap: 10px; }
    body:not(.nexin-scp) #header .pull-right { padding: 0; font-size: 12px; }
    body:not(.nexin-scp) #header #logo { gap: 10px; }
    body:not(.nexin-scp) #header #logo .nexin-logo-shield { height: 36px; }
    body:not(.nexin-scp) #header #logo .nexin-logo-wordmark { height: 18px; }
    body:not(.nexin-scp) .nexin-brand-copy small { font-size: 8px; }
    body.nexin-scp { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    body.nexin-scp.nexin-is-creating { padding-bottom: env(safe-area-inset-bottom); }
    body.nexin-scp #content { padding: 14px 12px; }
    body.nexin-scp .nexin-staff-open-intro { padding: 18px; }
    body.nexin-scp .nexin-staff-open-intro p { font-size: 14px; }
    body.nexin-scp .nexin-form-actions input { flex: 1 1 110px; }
    body.nexin-scp .nexin-form-actions input[type=submit] { flex-basis: 100%; }
    body.nexin-scp #nexin-staff-ticket-form .form_table > thead { display: none; }
    body.nexin-scp #nexin-staff-ticket-form .form_table td[colspan] { font-weight: normal; }
    /* Legacy table cells use a fixed 20px height. Stacked fields need natural height. */
    body.nexin-scp table.form_table,
    body.nexin-scp table.form_table > tbody,
    body.nexin-scp table.form_table > tbody > tr,
    body.nexin-scp table.form_table > tbody > tr > td,
    body.nexin-scp table.form_table > tbody > tr > th { height: auto !important; min-height: 0; overflow: visible; }
    body.nexin-scp table.form_table > tbody > tr > td { border-bottom: 0; padding: 8px 14px 14px; }
    body.nexin-scp table.form_table > tbody > tr > td:first-child { padding: 14px 14px 3px; }
    body.nexin-scp table.form_table > tbody > tr > td + td { padding-top: 4px; }
    body.nexin-scp table.form_table > tbody > tr { border-bottom: 1px solid #e5edf3; }
    body.nexin-scp table.form_table > tbody > tr > td input:not([type=radio]):not([type=checkbox]), body.nexin-scp table.form_table textarea, body.nexin-scp table.form_table select { width: 100%; }
    body.nexin-scp .dialog table, body.nexin-scp .dialog tbody, body.nexin-scp .dialog tr, body.nexin-scp .dialog td { display: block; width: 100% !important; box-sizing: border-box; }
    body.nexin-scp table.ticket_info table { width: 100% !important; table-layout: fixed; }
    body.nexin-scp table.ticket_info table th { width: 38% !important; }
    body.nexin-scp table.ticket_info table td { overflow-wrap: anywhere; }
    body.nexin-scp .thread-entry.avatar { margin-left: 40px; }
    body.nexin-scp .thread-entry.message.avatar { margin-left: 0; margin-right: 40px; }
    body.nexin-scp .thread-entry > .avatar { margin-left: -40px; }
    body.nexin-scp .thread-entry.message > .avatar { margin-left: 0; margin-right: -40px; }
    body.nexin-scp .thread-entry img.avatar.nexin-thread-avatar { width: 32px; height: 32px; }
    body.nexin-scp .thread-entry .header { line-height: 1.5; overflow-wrap: anywhere; }
    body.nexin-scp .thread-entry .thread-body { font-size: 15px; padding: 12px; overflow-wrap: anywhere; }
    body.nexin-scp .thread-body img, body.nexin-scp .thread-body video { max-width: 100%; height: auto; }
    body.nexin-scp .thread-event { margin-left: 40px; }
    body.nexin-scp #response_options, body.nexin-scp #response_options tbody, body.nexin-scp #response_options tr, body.nexin-scp #response_options td { display: block; width: 100% !important; box-sizing: border-box; }
    body.nexin-scp #ticket_tabs_container { overflow: visible; }
    body.nexin-scp #tickets table.list, #ticketTable.nexin-ticket-cards { min-width: 0 !important; }
    .nexin-ticket-cards, .nexin-ticket-cards tbody, .nexin-ticket-cards tfoot { display: block !important; width: 100% !important; border: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
    .nexin-ticket-cards thead { display: block; overflow-x: auto; margin-bottom: 12px; }
    .nexin-ticket-cards thead tr { display: flex; }
    .nexin-ticket-cards thead th { width: auto !important; flex: 0 0 auto; white-space: nowrap; border: 0 !important; border-radius: 8px; margin: 0 4px 0 0; }
    .nexin-ticket-cards thead th:empty { display: none; }
    .nexin-ticket-cards tbody > tr { display: flex; flex-direction: column; position: relative; padding: 10px 14px; margin-bottom: 12px; background: #fff; border: 1px solid #d7e3ed; border-radius: 14px; box-shadow: 0 4px 10px #15365108; }
    .nexin-ticket-cards tbody > tr > td { display: block; width: 100% !important; min-width: 0 !important; height: auto !important; padding: 6px 0 !important; white-space: normal !important; border: 0 !important; font-size: 14px; box-sizing: border-box; }
    .nexin-ticket-cards tbody > tr > td::before { content: attr(data-label); display: inline-block; min-width: 92px; margin-right: 8px; color: #61758a; font-size: 11px; font-weight: 700; }
    .nexin-ticket-cards tbody > tr > td[data-label=""]::before { content: none; }
    .nexin-ticket-cards tbody > tr > td > div { display: inline !important; white-space: normal !important; }
    .nexin-ticket-cards tbody a.truncate, .nexin-ticket-cards tbody .truncate { max-width: 100% !important; white-space: normal !important; height: auto; overflow-wrap: anywhere; }
    .nexin-ticket-cards tbody > tr > td.nexin-card-subject { order: -1; padding-right: 28px !important; }
    .nexin-ticket-cards tbody > tr > td.nexin-card-subject::before { display: none; }
    .nexin-card-subject a { display: block; font-size: 17px; font-weight: 750; line-height: 1.4; }
    .nexin-ticket-cards tbody > tr > td.nexin-card-selection { position: absolute; top: 7px; right: 7px; width: 38px !important; min-height: 40px; }
    .nexin-card-selection input { width: 22px; height: 22px; }
    .nexin-table-scroll table.list { display: table !important; min-width: 550px; }
    #container:has(#ticketForm) { margin-top: 10px; }
    #content:has(#ticketForm) { padding: 20px 14px; overflow: visible; }
    #ticketForm .redactor-toolbar { min-height: 44px; }
    #ticketForm .redactor-in, #reply .redactor-in { min-height: 170px !important; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
    #ticketForm .redactor-toolbar a, #reply .redactor-toolbar a { min-width: 40px; min-height: 44px; box-sizing: border-box; }
    #ticketForm .buttons { gap: 10px; }
    #ticketForm .buttons input { font-size: 16px; }
    #ticketForm .buttons input[type=button] { background: transparent !important; box-shadow: none; }
    .nexin-open-heading { padding: 22px; }
    #content .nexin-open-heading h1 { color: white; font-size: 29px; }
    #content .nexin-open-heading p { color: #e0eef7; font-size: 15px; }
    #landing_page .sidebar { order: 0; }
    #loginBox input { font-size: 16px; }
}
@media (max-height: 720px) {
    #loginBody #loginBox { position: relative; top: auto; left: auto; transform: none; margin: 24px auto; }
    #loginBody #poweredBy { position: relative; left: auto; right: auto; bottom: auto; transform: none; width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; margin: 24px auto; }
}
@media print { .nexin-mobile-new-ticket, #nexin-mobile-queues, .nexin-account-toggle, .nexin-install-app, .nexin-connection-notice { display: none !important; } }
