/* Shared action palette, loaded after each page's component styles. */
:root {
  --cta-teal: #087d98;
  --cta-teal-hover: #06677d;
  --cta-ink: #153f50;
  --cta-seafoam: #e3efea;
  --cta-seafoam-hover: #cfe4dc;
  --cta-sand: #f2e7d1;
  --cta-sand-hover: #e8d8b8;
}

/* Keep section destinations clear of the sticky site header. */
html { scroll-padding-top: 96px; }

body[data-page] :is(.button, .tp-button, .pr-button, .co-button, .tm-button, .lr-button, .dns-action, .ad-button, .ac-button, .am-button, .tv-button, .cf-button, .bu-button, .ar-report-button, .ad-text-button) {
  --cta-fill: var(--cta-teal);
  --cta-text: #fff;
  --cta-stroke: var(--cta-teal);
  --cta-hover-fill: var(--cta-teal-hover);
  --cta-hover-stroke: var(--cta-teal-hover);
  background: var(--cta-fill);
  border-color: var(--cta-stroke);
  color: var(--cta-text);
  text-decoration: none;
  text-underline-offset: initial;
  max-width: 100%;
  white-space: normal;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* Alternate paired actions by purpose: teal primary, seafoam secondary. */
body[data-page] :is(.button-secondary, .tp-button-outline, .pr-button-outline, .co-button-outline, .tm-button-outline, .lr-button-light, .dns-action-light, .ad-button-outline, .ac-button-outline, .am-button-outline, .tv-button-outline, .cf-button-outline, .bu-button-light, .ar-report-button, .ad-text-button) {
  --cta-fill: var(--cta-seafoam);
  --cta-text: var(--cta-ink);
  --cta-stroke: #aac8c3;
  --cta-hover-fill: var(--cta-seafoam-hover);
  --cta-hover-stroke: #7ba99e;
}

body[data-page] :is(.button-light, .lr-button-sand, .ad-button-soft, .bu-button-sand) {
  --cta-fill: var(--cta-sand);
  --cta-text: var(--cta-ink);
  --cta-stroke: #d6c6a6;
  --cta-hover-fill: var(--cta-sand-hover);
  --cta-hover-stroke: #b9a780;
}

body[data-page] .ac-button-danger {
  --cta-fill: #f6ead9;
  --cta-text: #805729;
  --cta-stroke: #d7bd98;
  --cta-hover-fill: #ebd8bc;
  --cta-hover-stroke: #b39367;
}

body[data-page] :is(.button, .tp-button, .pr-button, .co-button, .tm-button, .lr-button, .dns-action, .ad-button, .ac-button, .am-button, .tv-button, .cf-button, .bu-button, .ar-report-button, .ad-text-button):is(:hover, :active) {
  background: var(--cta-hover-fill);
  border-color: var(--cta-hover-stroke);
  color: var(--cta-text);
  text-decoration: none;
}

body[data-page] :is(.button, .tp-button, .pr-button, .co-button, .tm-button, .lr-button, .dns-action, .ad-button, .ac-button, .am-button, .tv-button, .cf-button, .bu-button, .ar-report-button, .ad-text-button):focus-visible {
  outline: 3px solid var(--cta-teal);
  outline-offset: 4px;
  text-decoration: none;
}

body[data-page] :is(.button, .tp-button, .pr-button, .co-button, .tm-button, .lr-button, .dns-action, .ad-button, .ac-button, .am-button, .tv-button, .cf-button, .bu-button, .ar-report-button, .ad-text-button):is(:disabled, [aria-disabled="true"]) {
  background: #e2e8e5;
  border-color: #c4d2cc;
  color: #57686b;
  opacity: 1;
  cursor: not-allowed;
  text-decoration: none;
  box-shadow: none;
}

/* Small portal actions are buttons too; tabs and ordinary text links stay distinct. */
body[data-page] :is(.tp-owner-link, .tp-sidebar-bottom a, .tp-sidebar-bottom button, .tp-photo-actions button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #aac8c3;
  border-radius: 24px;
  background: var(--cta-seafoam);
  color: var(--cta-ink);
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
}
body[data-page] :is(.tp-owner-link, .tp-sidebar-bottom a, .tp-sidebar-bottom button, .tp-photo-actions button):hover {
  background: var(--cta-seafoam-hover);
  border-color: #7ba99e;
  text-decoration: none;
}
body[data-page] :is(.tp-owner-link, .tp-sidebar-bottom a, .tp-sidebar-bottom button, .tp-photo-actions button):focus-visible {
  outline: 3px solid var(--cta-teal);
  outline-offset: 4px;
  text-decoration: none;
}
body[data-page] .ac-close-button {
  background: var(--cta-seafoam);
  color: var(--cta-ink);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page] :is(.button, .tp-button, .pr-button, .co-button, .tm-button, .lr-button, .dns-action, .ad-button, .ac-button, .am-button, .tv-button, .cf-button, .bu-button, .ar-report-button, .ad-text-button) { transition: none; }
}

body[data-page] :is(.lr-button,.dns-action),body[data-page] .mc-root :is(.ad-button,.tp-button){border-radius:28px}

/* Compact portal actions keep the same touch target as their full-size peers. */
body[data-page] :is(
  .tp-card-actions .tp-button,
  .tp-photo-count .tp-button,
  .tp-workspace-header .tp-button,
  .tp-preview-dialog-top .tp-button,
  .pr-dialog-top .pr-button,
  .co-consultation-top > .co-button,
  .ad-workspace-header > .ad-button
) { min-height: 44px; }

/* A native section picker keeps long dashboard menus comfortable on phones. */
.tp-page .tp-section-picker,.ad-page .ad-section-picker { display:none; }
@media(max-width:850px) {
  .tp-page[data-tp-mobile-nav-ready="true"] .tp-sidebar > nav,
  .ad-page[data-ad-mobile-nav-ready="true"] .ad-sidebar > nav { display:none; }
  .tp-page[data-tp-mobile-nav-ready="true"] .tp-section-picker,
  .ad-page[data-ad-mobile-nav-ready="true"] .ad-section-picker {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-column:1 / -1;
    gap:8px;
    width:100%;
    min-width:0;
    margin:0;
    color:#153f50;
    font-size:14px;
    font-weight:700;
    line-height:1.45;
    text-transform:none;
    letter-spacing:0;
  }
  .tp-page[data-tp-mobile-nav-ready="true"] .tp-section-picker { margin-bottom:22px; }
  .tp-page .tp-section-picker select,.ad-page .ad-section-picker select {
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    min-width:0;
    min-height:48px;
    padding:12px 36px 12px 14px;
    border:1px solid #aac8c3;
    border-radius:12px;
    background-color:#f5f8f0;
    color:#153f50;
    font:inherit;
    font-size:16px;
    font-weight:500;
    line-height:1.45;
    text-overflow:ellipsis;
  }
  .tp-page .tp-section-picker select:focus-visible,.ad-page .ad-section-picker select:focus-visible {
    outline:3px solid #087d98;
    outline-offset:3px;
  }
}

/* Relax display headings inside the compact mobile management workspaces. */
@media(max-width:700px){
 :is(.tp-page,.ad-page) :is(h1,h2){line-height:1.25;overflow-wrap:break-word}
}

/* Business updates share the site action colors rather than a separate palette. */
body[data-page] .bu-button { color:var(--cta-text)!important; filter:none; }
body[data-page] .bu-button:is(:disabled,[aria-disabled="true"]) { color:#57686b!important; }

/* Keep legacy desktop form controls readable in the management workspaces. */
body[data-page] main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]):not([type=reset]),select,textarea){font-size:14px!important}

/* Phones and tablets share readable controls through the compact navigation breakpoint. */
@media(max-width:1100px){
 body[data-page] main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]):not([type=reset]),select,textarea){font-size:16px!important}
 body[data-page] :is(.button,.tp-button,.pr-button,.co-button,.tm-button,.lr-button,.dns-action,.ad-button,.ac-button,.am-button,.tv-button,.cf-button,.bu-button,.ar-report-button,.ad-text-button){min-height:48px!important}
 body[data-page] :is(.ac-tab,.ar-tenant-table thead button){min-height:48px}
}

/* Reusable weekly-hours tools edit the draft without crowding daily time fields. */
.hours-copy{min-width:0;margin:18px 0;padding:18px;border:1px solid #aac8c3;border-radius:14px}
.hours-copy legend,.hours-copy-day legend{padding:0 6px;color:#153f50;font-size:14px;font-weight:600;line-height:1.5}
.hours-copy-targets{min-width:0;margin:0;padding:0;border:0}
.hours-copy-targets legend{padding:0;margin-bottom:10px}
.hours-copy-days,.hours-copy-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.hours-copy-days label{display:inline-flex;align-items:center;gap:7px;min-height:32px;font-size:14px;line-height:1.5;color:#153f50}
.hours-copy-days input[type="checkbox"]{width:18px;height:18px;flex-shrink:0}
.hours-copy-actions{margin-top:18px;gap:10px}
.hours-copy-actions button{min-height:44px;white-space:normal;line-height:1.5}
.hours-copy-hint{margin-top:14px!important}
.hours-copy-status{min-height:1.5em;margin:12px 0 0;font-size:14px;line-height:1.6;color:#285f66}
.hours-copy-builder{min-width:0;margin:18px 0}
.hours-copy-builder>summary{padding:14px 16px;border:1px solid #aac8c3;border-radius:12px;background:#e3efea;color:#153f50;cursor:pointer;font-size:14px;font-weight:600;line-height:1.6}
.hours-copy-builder>summary:focus-visible{outline:3px solid #087d98;outline-offset:4px}
.hours-copy-builder>p{font-size:14px;line-height:1.8;margin:16px 0}
.hours-copy-day{min-width:0;padding:16px;margin:0;border:1px solid #cadfda;border-radius:12px}
.hours-copy-day input[type="time"]{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:600px){.hours-copy{padding:16px}.hours-copy-actions{align-items:stretch}.hours-copy-actions>button{flex:1 1 100%;min-height:48px}.hours-copy-days{gap:10px 14px}}
.cloud-portal .hours-copy-days input[type="checkbox"],.cloud-portal .hours-copy-day input[type="checkbox"]{width:18px;min-height:18px;height:18px;padding:0;accent-color:#087d98}
.hours-copy-day>label:first-of-type{display:flex;align-items:center;gap:8px;margin:0 0 14px;font-size:14px;line-height:1.6}
.cloud-portal .cp-update-cover-upload fieldset{min-width:0;border:1px solid #aac8c3;border-radius:14px;padding:18px;background:#f4f9f5}
.cloud-portal .cp-update-cover-upload legend{padding:0 7px;font-size:16px;font-weight:600;line-height:1.5;color:#153f50}
.cloud-portal .cp-update-cover-upload .cp-grid{margin:16px 0}
.cloud-portal .cp-update-editor-photo{display:block;width:100%;max-width:420px;max-height:240px;object-fit:cover;border-radius:12px}
.hours-copy .cp-field{align-content:start}
.hours-copy .cp-field select{height:48px}
