/* Shared mobile layer. Desktop layouts and the admin Save/Send placement stay intact. */
.tmcq-compact-number, .tmcq-compact-title, .tmcq-compact-meta, .tmcq-quote-details-toggle,
.tmcq-disclosure-toggle,
.tmcq-mobile-editor-summary,
.tmcq-mobile-filter-toggle,
.tmcq-filter-chips,
.tmcq-mobile-select-all-label,
.tmcq-calendar-view-switch,
.tmcq-mobile-agenda,
.tmcq-contact-shortcuts { display: none; }
.tmcq-selection-save-feedback { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; min-height: 24px; font-size: 14px; }
.tmcq-selection-save-feedback button { min-height: 44px; padding: 8px 14px; cursor: pointer; }
.tmcq-selection-save-feedback button[hidden] { display: none; }
.tmcq-draft-notice { padding: 16px; margin-bottom: 18px; border: 1px solid #cad5df; border-radius: 12px; background: #f2f6fa; }
.tmcq-draft-notice button { min-height: 44px; margin: 4px 8px 4px 0; cursor: pointer; }
.tmcq-disclosure-body { min-width: 0; }
.tmcq-admin-shell .tmcq-mobile-quote-edit { display: none; }
.tmcq-dialog-open { overflow: hidden; overscroll-behavior: contain; }

@media (max-width: 960px) {
  .tmcq-request-form, .tmcq-portal, .tmcq-account-page { box-sizing: border-box; max-width: 100%; }
  .tmcq-request-form *, .tmcq-portal *, .tmcq-account-page * { box-sizing: border-box; }
  .tmcq-request-form input, .tmcq-request-form select, .tmcq-request-form textarea,
  .tmcq-portal input, .tmcq-portal select, .tmcq-portal textarea,
  .tmcq-account-page input, .tmcq-account-page select, .tmcq-account-page textarea { font-size: 16px !important; }
  .tmcq-request-form button, .tmcq-portal button, .tmcq-account-page button,
  .tmcq-account-page .tmcq-pill, .tmcq-portal .tmcq-pill { min-height: 44px; touch-action: manipulation; }
  .tmcq-request-form input[type="checkbox"], .tmcq-portal input[type="checkbox"], .tmcq-account-page input[type="checkbox"] { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
  .tmcq-request-form .tmcq-form { padding: 8px; }
  .tmcq-request-form .tmcq-request-step-card { padding: 10px; }
  .tmcq-request-form .tmcq-availability-calendar-panel { padding: 8px 2px; }
  .tmcq-request-form .tmcq-availability-shell-modern .tmcq-availability-grid,
  .tmcq-request-form .tmcq-availability-shell-modern .tmcq-availability-weekdays { gap: 2px; }
  .tmcq-request-form .tmcq-availability-shell-modern .tmcq-calendar-day { min-width: 0; width: 100%; min-height: 46px; padding: 0; }
  .tmcq-request-form .tmcq-request-calendar-nav { width: 46px; min-width: 46px; height: 46px; }
  .tmcq-request-form .tmcq-time-slot-list { max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-right: 0; }
  .tmcq-request-form .tmcq-time-slot { min-height: 48px; }
  .tmcq-request-form .tmcq-request-step-actions button,
  .tmcq-request-form .tmcq-request-submit-row button[type="submit"] { min-width: 0; }
  .tmcq-request-form .tmcq-form-section-head p,
  .tmcq-portal .tmcq-form-section-head p { line-height: 1.6; }
  .tmcq-request-form .tmcq-disclosure-toggle, .tmcq-portal .tmcq-disclosure-toggle { display: flex; }
  .tmcq-request-form .tmcq-disclosure-body[hidden], .tmcq-portal .tmcq-disclosure-body[hidden] { display: none; }
  .tmcq-request-form [id], .tmcq-portal [id], .tmcq-request-form button, .tmcq-portal form { scroll-margin-top: 20px; scroll-margin-bottom: 20px; }
  .tmcq-dialog-modal {
    position: fixed; top: calc(var(--tmcq-viewport-top, 0px) + 8px); bottom: auto;
    margin: 0 auto; width: calc(100vw - 16px); max-width: calc(100vw - 16px);
    max-height: calc(var(--tmcq-viewport-height, 100dvh) - 16px); border-radius: 14px;
  }
  .tmcq-dialog-modal .tmcq-dialog-shell { max-height: calc(var(--tmcq-viewport-height, 100dvh) - 16px); grid-template-rows: auto minmax(0, 1fr) auto; }
  .tmcq-dialog-modal .tmcq-dialog-header { padding: 12px 14px; }
  .tmcq-dialog-modal .tmcq-dialog-body { min-height: 0; overflow-y: auto; padding: 14px; }
  .tmcq-dialog-modal .tmcq-dialog-footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .tmcq-dialog-modal .tmcq-dialog-close { width: 46px; min-width: 46px; height: 46px; flex-shrink: 0; }
  .tmcq-request-form .tmcq-backdrop-grid-modal, .tmcq-portal .tmcq-backdrop-grid-modal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tmcq-portal .tmcq-contact-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
  .tmcq-portal .tmcq-contact-shortcuts a { display: inline-flex; min-height: 44px; align-items: center; padding: 6px 12px; border: 1px solid #cbd5df; border-radius: 9px; text-decoration: none; }
  .tmcq-portal .tmcq-line-items td { overflow-wrap: anywhere; }
  .tmcq-portal .tmcq-line-items td:last-child { white-space: nowrap; }
}

.tmcq-disclosure-toggle {
  align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px;
  padding: 10px 0; border: 0; background: transparent; color: #263342; text-align: left; font: inherit; font-weight: 700; cursor: pointer;
}
.tmcq-disclosure-toggle::after { content: '+'; font-size: 22px; flex-shrink: 0; }
.tmcq-disclosure-toggle[aria-expanded="true"]::after { content: '−'; }
.tmcq-disclosure-body > :first-child { margin-top: 0; }

.tmcq-quote-table .tmcq-compact-title { display: inline; font: inherit; color: inherit; text-decoration: none; }
@media (max-width: 782px) {
  .tmcq-admin-shell, .tmcq-admin-shell *, .tmcq-account-page .tmcq-mobile-cards * { box-sizing: border-box; }
  .tmcq-admin-shell { max-width: 100%; min-width: 0; }
  .tmcq-admin-shell .tmcq-admin-card { padding: 14px; min-width: 0; }
  .tmcq-admin-shell .tmcq-admin-hero { padding: 18px; }
  .tmcq-admin-shell input:not([type="checkbox"]):not([type="radio"]), .tmcq-admin-shell select, .tmcq-admin-shell textarea { font-size: 16px; min-width: 0; }
  .tmcq-admin-shell input[type="checkbox"] { width: 22px; height: 22px; margin: 0; }
  .tmcq-admin-shell .button, .tmcq-admin-shell button:not(.tmcq-disclosure-toggle), .tmcq-admin-shell .tmcq-settings-tab { min-height: 44px; touch-action: manipulation; }
  .tmcq-admin-shell p, .tmcq-admin-shell a, .tmcq-admin-shell td { overflow-wrap: anywhere; }
  .tmcq-admin-shell .tmcq-quote-edit-layout, .tmcq-admin-shell .tmcq-quote-field-grid,
  .tmcq-admin-shell .tmcq-dashboard-grid, .tmcq-admin-shell .tmcq-admin-grid,
  .tmcq-admin-shell .tmcq-field-grid, .tmcq-admin-shell .tmcq-field-grid-two { grid-template-columns: minmax(0, 1fr); }
  .tmcq-admin-shell .tmcq-quote-edit-sidebar { position: static; }
  .tmcq-admin-shell .tmcq-quote-form-card, .tmcq-admin-shell .tmcq-quote-sidebar-card { overflow: visible; }
  .tmcq-admin-shell .tmcq-disclosure-toggle, .tmcq-mobile-editor-summary { display: flex; }
  .tmcq-admin-shell .tmcq-disclosure-body[hidden] { display: none; }
  .tmcq-mobile-editor-summary { padding: 14px 16px; margin-bottom: 12px; border: 1px solid #d5dfe9; border-radius: 12px; background: #fff; font-size: 18px; font-weight: 700; }
  .tmcq-mobile-cards, .tmcq-mobile-cards tbody { display: block; width: 100%; border: 0; }
  .tmcq-mobile-cards thead { display: none; }
  .tmcq-mobile-cards:has([data-tmcq-select-all]) thead { display: block; margin-bottom: 12px; }
  .tmcq-mobile-cards thead tr { display: block; }
  .tmcq-mobile-cards thead th { display: none; }
  .tmcq-mobile-cards thead th.check-column { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 44px; width: 100%; padding: 10px 12px !important; text-align: left; }
  .tmcq-admin-shell .tmcq-mobile-cards thead th.check-column input[type="checkbox"] { margin: 0; flex: 0 0 22px; }
  .tmcq-mobile-select-all-label { display: inline; }
  .tmcq-mobile-cards tbody { display: grid; gap: 14px; }
  .tmcq-mobile-cards tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid #dce3ec; border-radius: 12px; background: #fff !important; box-shadow: 0 4px 14px #2633420a; }
  .tmcq-mobile-cards tbody > tr > td { display: block; min-width: 0; width: auto; padding: 0 !important; border: 0; text-align: left; line-height: 1.5; }
  .tmcq-mobile-cards td::before { display: block; content: attr(data-label); color: #637184; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
  .tmcq-mobile-cards td.check-column { min-height: 44px; display: flex; align-items: center; }
  .tmcq-mobile-cards td.tmcq-card-wide, .tmcq-mobile-cards td.tmcq-card-title { grid-column: 1 / -1; }
  .tmcq-mobile-cards td.tmcq-card-title { font-size: 17px; font-weight: 700; }
  .tmcq-mobile-cards td.tmcq-card-title > a { display: inline-flex; align-items: center; min-height: 44px; }
  .tmcq-mobile-cards td.check-column::before { content: none; }
  .tmcq-quote-table tbody { gap: 8px; }
  .tmcq-quote-table tbody > .tmcq-compact-quote { grid-template-columns: minmax(0, 1fr); gap: 8px 12px; padding: 10px 12px; }
  .tmcq-quote-table tbody > .tmcq-compact-selectable { grid-template-columns: 22px minmax(0, 1fr); }
  .tmcq-quote-table .tmcq-compact-quote > td { display: none; }
  .tmcq-quote-table .tmcq-compact-quote > td.check-column { display: flex; grid-column: 1; align-self: start; width: 22px; padding: 0 !important; }
  .tmcq-quote-table .check-column input[type="checkbox"] { margin: 0; flex-shrink: 0; }
  .tmcq-quote-table .tmcq-compact-quote > .tmcq-compact-customer { display: block; grid-column: -2 / -1; font-size: 14px; font-weight: 400; }
  .tmcq-quote-table .tmcq-compact-customer::before { display: none; }
  .tmcq-quote-table .tmcq-compact-title { display: flex; font-size: 15px; font-weight: 700; color: #2271b1; }
  .tmcq-compact-number { display: inline; white-space: pre; }
  .tmcq-compact-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: #526174; }
  .tmcq-admin-shell .tmcq-quote-details-toggle { display: inline-flex; align-items: center; padding: 0; border: 0; background: transparent; color: #2271b1; font: inherit; cursor: pointer; }
  .tmcq-quote-table .tmcq-compact-customer .tmcq-contact-shortcuts { display: none; }
  .tmcq-quote-table .tmcq-compact-expanded > .tmcq-compact-detail {
    display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; grid-column: 1 / -1;
    padding: 10px 0 !important; border-top: 1px solid #e6ebf1; font-size: 14px;
  }
  .tmcq-quote-table .tmcq-compact-detail::before { margin: 0; font-size: 13px; }
  .tmcq-quote-table .tmcq-compact-detail .tmcq-contact-shortcuts { grid-column: 2; margin: 0; }
  .tmcq-quote-table .tmcq-compact-expanded > .tmcq-compact-actions { display: block; grid-column: 1 / -1; padding-top: 10px !important; border-top: 1px solid #e6ebf1; }
  .tmcq-quote-table .tmcq-compact-actions::before { display: none; }
  .tmcq-admin-shell .tmcq-compact-actions .tmcq-quote-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .tmcq-admin-shell .tmcq-compact-actions .button { min-width: 70px; justify-content: center; }
  .tmcq-admin-shell .tmcq-mobile-quote-edit { display: inline-flex; }
  .tmcq-quote-row-actions { gap: 12px; }
  .tmcq-quote-row-actions button { min-width: 92px; }
  .tmcq-contact-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
  .tmcq-contact-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border: 1px solid #cbd5df; border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 600; }
  .tmcq-editor-shortcuts { margin-bottom: 14px; }
  .tmcq-admin-shell .tmcq-quote-filter-form { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .tmcq-mobile-filter-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .tmcq-mobile-filter-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tmcq-mobile-filter-fields[hidden] { display: none; }
  .tmcq-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .tmcq-filter-chips:empty { display: none; }
  .tmcq-filter-chip { border: 1px solid #ccd7e2; background: #fff; color: #28384b; border-radius: 22px; min-height: 44px; padding: 7px 12px; font: inherit; text-align: left; }
  .tmcq-quote-search-panel { width: 100%; min-width: 0; max-width: 100%; }
  .tmcq-quote-search-result { min-height: 60px; }
  .tmcq-quote-search-result span { font-size: 13px; }
  .tmcq-calendar-view-switch { display: flex; gap: 8px; margin: 12px 0; }
  .tmcq-calendar-view-switch[hidden] { display: none; }
  .tmcq-calendar-view-switch [aria-pressed="true"] { background: #414e60; color: #fff; }
  .tmcq-mobile-agenda { display: grid; gap: 8px; }
  .tmcq-mobile-agenda[hidden], .tmcq-calendar-month-hidden { display: none !important; }
  .tmcq-agenda-day { display: grid; gap: 6px; width: 100%; padding: 14px; background: #fff; border: 1px solid #d5dfe9; border-radius: 12px; text-align: left; font: inherit; color: #263342; }
  .tmcq-agenda-day span { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
  .tmcq-agenda-day[aria-pressed="true"] { border: 2px solid #414e60; background: #f0f4f8; }
  .tmcq-admin-calendar-grid, .tmcq-admin-calendar-weekdays { gap: 2px; }
  .tmcq-admin-shell .tmcq-admin-calendar-day { min-height: 64px; padding: 4px 0; align-items: center; text-align: center; }
  .tmcq-admin-calendar-day small { display: none; }
  .tmcq-admin-shell .tmcq-bulk-toolbar { padding: 12px; }
  .tmcq-bulk-toolbar .tmcq-admin-toolbar-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .tmcq-admin-shell .tmcq-admin-grid table:not(.tmcq-mobile-cards) { max-width: 100%; }
}
@media (min-width: 783px) {
  .tmcq-admin-shell .tmcq-quote-filter-form { grid-template-columns: minmax(0, 1fr); }
  .tmcq-quote-filter-form .tmcq-quote-search { width: 100%; grid-column: 1 / -1; }
  .tmcq-admin-shell .tmcq-mobile-filter-toggle { display: none; }
  .tmcq-mobile-filter-fields, .tmcq-mobile-filter-fields[hidden] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 16px; align-items: end; }
}
@media (max-width: 360px) {
  .tmcq-request-form .tmcq-backdrop-grid-modal, .tmcq-portal .tmcq-backdrop-grid-modal { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tmcq-admin-shell *, .tmcq-request-form *, .tmcq-portal *, .tmcq-account-page * { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: .01ms !important; }
}

@media (max-width: 782px) { .tmcq-quote-search-panel.tmcq-search-above { top: auto; bottom: calc(100% + 6px); } }
