/* Magic UI Magic Card / Bento principles adapted for TAPO's Blade frontend.
   Keep saved geometry and the shared panel transition in their existing owners.
   Reference: https://github.com/magicuidesign/magicui/tree/main/skills/magic-ui */
@layer tapo-neutral {
 body #app#app#app#app#app#app#app .customer-hub:has(.tb-grid) {
  --lg-surface:rgba(255,255,255,.58);--lg-ink:#1c1c1e;
  --lg-edge:rgba(255,255,255,.68);--lg-highlight:rgba(255,255,255,.9);
  --lg-shadow:rgba(20,24,32,.08);
 }
 body #app#app#app#app#app#app#app .customer-hub:has(.tb-grid[data-widget-tint=black]) {
  --lg-surface:rgba(28,28,30,.52);--lg-ink:#f5f5f7;
  --lg-edge:rgba(255,255,255,.23);--lg-highlight:rgba(255,255,255,.2);
  --lg-shadow:rgba(0,0,0,.16);
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile {
  box-shadow:inset 0 1px 0 var(--lg-highlight),0 3px 12px var(--lg-shadow)!important;
  -webkit-backdrop-filter:blur(16px) saturate(135%)!important;
  backdrop-filter:blur(16px) saturate(135%)!important;
  transition:box-shadow 160ms ease-out,border-color 160ms ease-out!important;
 }
 /* Original white Liquid Glass: translucent material, crisp content. */
 body #app#app#app#app#app#app#app .customer-hub .tb-grid[data-widget-tint=white]>.tb-tile:not(.tb-logo-only,.tew-has-media,.tb-instagram) {
  background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,0) 48%),var(--lg-surface)!important;
  box-shadow:inset 0 1px 0 var(--lg-highlight),inset 0 -1px 0 rgba(255,255,255,.06),0 5px 18px rgba(0,0,0,.12)!important;
  -webkit-backdrop-filter:blur(24px) saturate(165%)!important;
  backdrop-filter:blur(24px) saturate(165%)!important;
 }
 /* Black and custom tints use stronger diffusion; white keeps its original material. */
 body #app#app#app#app#app#app#app .customer-hub .tb-grid:is([data-widget-tint=black],[data-widget-tint=tapo])>.tb-tile:not(.tb-logo-only,.tew-has-media,.tb-instagram) {
  -webkit-backdrop-filter:blur(24px) saturate(120%)!important;
  backdrop-filter:blur(24px) saturate(120%)!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid[data-widget-tint=tapo]>.tb-tile[data-widget-color]:not(.tb-logo-only,.tew-has-media,.tb-instagram) {
  --lg-ink:var(--tb-custom-ink,#1c1c1e);
  background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,0) 48%),color-mix(in srgb,var(--tb-custom-color) 52%,transparent)!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile:is(.tb-logo-only,.tew-has-media,.tb-instagram) {
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile:not([data-bento-size=small]) .tb-tile-heading {
  gap:8px!important;min-height:22px!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile:not([data-bento-size=small]) :is(.tb-title,.tb-social-name) {
  font-size:14px!important;font-weight:600!important;line-height:1.3!important;
  letter-spacing:-.015em!important;text-wrap:pretty;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile .tb-caption {
  font-size:12px!important;line-height:1.4!important;font-weight:400!important;
  opacity:.85!important;letter-spacing:0!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-instagram:not([data-bento-size=small]) .ti-label {
  padding:12px!important;gap:7px!important;
  background:linear-gradient(180deg,#0009 0%,#0005 55%,transparent 100%)!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile .hub-chevron {
  opacity:.65!important;
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile:is(button,a):focus-visible {
  outline:3px solid #007aff!important;outline-offset:3px!important;
 }
 @media(hover:hover) and (pointer:fine) {
  body #app#app#app#app#app#app#app .customer-hub:not(.preview-hub) .tb-grid>.tb-tile:is(button,a):hover:not(:disabled) {
   box-shadow:inset 0 1px 0 var(--lg-highlight),inset 0 0 0 1px #ffffff45,0 6px 20px var(--lg-shadow)!important;
   border-color:var(--lg-highlight)!important;
  }
 }
 body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile:is(button,a):active:not(:disabled) {
  box-shadow:inset 0 0 0 2px #007aff40,0 1px 4px var(--lg-shadow)!important;
 }
 body #app#app#app#app#app#app#app .customer-sheet.tb-zoom .sheet-header {
  min-height:60px!important;padding:12px 16px!important;gap:12px!important;
 }
 body #app#app#app#app#app#app#app .customer-sheet.tb-zoom .sheet-header :is(strong,.tb-shared-label) {
  font-size:17px!important;line-height:1.3!important;font-weight:600!important;letter-spacing:-.02em!important;
 }
 body #app#app#app#app#app#app#app .customer-sheet.tb-zoom .customer-sheet-close {
  flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;
 }
 body #app#app#app#app#app#app#app .customer-sheet.tb-zoom .sheet-body :is(input,select,textarea) {
  font-size:16px!important;line-height:1.4!important;border-radius:12px!important;
 }
 @media(max-width:359px),(max-height:700px) {
  body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile:not([data-bento-size=small]) :is(.tb-title,.tb-social-name) {font-size:12px!important;}
  body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile .tb-caption {font-size:10px!important;}
  body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-instagram:not([data-bento-size=small]) .ti-label {padding:8px!important;gap:6px!important;}
 }
 @supports not (backdrop-filter:blur(1px)) {
  body #app#app#app#app#app#app#app .customer-hub:has(.tb-grid) {--lg-surface:#f8f8fa;}
  body #app#app#app#app#app#app#app .customer-hub:has(.tb-grid[data-widget-tint=black]) {--lg-surface:#1c1c1e;}
 }
 @media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  body #app#app#app#app#app#app#app .customer-hub:has(.tb-grid) {--lg-surface:#fff;--lg-edge:#8e8e93;}
  body #app#app#app#app#app#app#app .customer-hub:has(.tb-grid[data-widget-tint=black]) {--lg-surface:#1c1c1e;}
  body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile {-webkit-backdrop-filter:none!important;backdrop-filter:none!important;}
  body #app#app#app#app#app#app#app .customer-hub .tb-grid:is([data-widget-tint=black],[data-widget-tint=tapo])>.tb-tile:not(.tb-logo-only,.tew-has-media,.tb-instagram) {-webkit-backdrop-filter:none!important;backdrop-filter:none!important;}
 }
 @supports not (backdrop-filter:blur(1px)) {
  body #app#app#app#app#app#app#app .customer-hub .tb-grid[data-widget-tint=tapo]>.tb-tile[data-widget-color]:not(.tb-logo-only,.tew-has-media,.tb-instagram) {background:var(--tb-custom-color)!important;}
 }
 @media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  body #app#app#app#app#app#app#app .customer-hub .tb-grid[data-widget-tint=tapo]>.tb-tile[data-widget-color]:not(.tb-logo-only,.tew-has-media,.tb-instagram) {background:var(--tb-custom-color)!important;}
 }
 @media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  body #app#app#app#app#app#app#app .customer-hub .tb-grid[data-widget-tint=white]>.tb-tile:not(.tb-logo-only,.tew-has-media,.tb-instagram) {background:var(--lg-surface)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;}
 }
 @media(prefers-reduced-motion:reduce) {
  body #app#app#app#app#app#app#app .customer-hub .tb-grid>.tb-tile {transition:none!important;}
 }
}
