/* MyWeatha v47 — iOS widget interactions.
   Small motion, real finger tracking, preview reflow, direct size actions. */
body.wa-edit-mode #home .content [data-wa-block]:not(.studio-teaser),
body.wa-edit-mode #home .tile-grid>[data-card]{
 transition:border-color .22s ease,box-shadow .24s ease,filter .2s ease!important;
 -webkit-tap-highlight-color:transparent;
 user-select:none!important;
 -webkit-user-select:none!important;
 touch-action:none!important;
}
/* Disable legacy perpetual wobble; calm, floating iOS-like selection is clearer. */
body.wa-edit-mode #home .content.editing>[data-wa-block],
body.wa-edit-mode #home #cards.editing>.tile,
body.wa-edit-mode #home #waLateCards.editing>.tile,
body.wa-edit-mode #home .content>[data-wa-block],
body.wa-edit-mode #home #waLateCards>.tile{
 animation:none!important;
}
body.wa-edit-mode #home .content [data-wa-block].wa-ios-selected,
body.wa-edit-mode #home .tile-grid>[data-card].wa-ios-selected{
 outline:2px solid rgba(156,244,255,.98)!important;
 outline-offset:1px!important;
 box-shadow:0 0 0 5px rgba(67,203,252,.10),0 16px 34px rgba(3,28,75,.28),inset 0 1px rgba(255,255,255,.43)!important;
 z-index:4!important;
}
body.wa-ios-dragging{cursor:grabbing}
body.wa-ios-dragging #home .wa-ios-placeholder{
 opacity:.28!important;
 filter:saturate(.7)!important;
 border:2px dashed rgba(174,233,255,.9)!important;
 box-shadow:inset 0 0 30px rgba(49,185,247,.14)!important;
}
.wa-ios-floating-widget{
 border-radius:26px!important;
 border:1.5px solid rgba(223,248,255,.9)!important;
 box-shadow:0 32px 65px rgba(0,8,35,.45),0 10px 20px rgba(12,44,92,.32),inset 0 1px rgba(255,255,255,.44)!important;
 -webkit-backdrop-filter:blur(19px) saturate(145%)!important;
 backdrop-filter:blur(19px) saturate(145%)!important;
 overflow:hidden!important;
 filter:brightness(1.08) saturate(1.12);
 will-change:transform;
 transform-origin:center;
 transition:box-shadow .2s ease;
 animation:wa-ios-widget-lift .19s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes wa-ios-widget-lift{
 from{filter:brightness(.95);box-shadow:0 8px 16px rgba(0,0,0,.12)}
 to{filter:brightness(1.08)}
}
body.wa-edit-mode #home .wa-ios-drop-target:not(.wa-ios-placeholder){
 outline:2px dashed rgba(154,237,255,.94)!important;
 outline-offset:-5px!important;
 background-image:linear-gradient(125deg,rgba(42,178,252,.20),rgba(145,118,247,.20))!important;
 box-shadow:0 0 0 3px rgba(61,207,255,.14)!important;
}
body.wa-edit-mode .wa-ios-size-pulse{
 outline:3px solid rgba(166,241,255,.98)!important;
 box-shadow:0 0 0 7px rgba(66,195,252,.16),0 10px 32px rgba(11,75,146,.2)!important;
}
/* The original top-of-page size toolbar is replaced by a reachable floating menu. */
body.wa-edit-mode #home .content>.wa-grid-sizebar{display:none!important}
.wa-ios-size-menu[hidden]{display:none!important}
.wa-ios-size-menu{
 position:fixed;
 z-index:2147483645;
 bottom:max(108px,calc(env(safe-area-inset-bottom,0px) + 102px));
 left:50%;
 transform:translateX(-50%);
 width:min(420px,calc(100vw - 26px));
 max-height:min(260px,40vh);
 overflow:auto;
 scrollbar-width:none;
 padding:13px;
 border:1px solid rgba(211,243,255,.61);
 border-top-color:rgba(255,255,255,.85);
 border-radius:24px;
 color:#eff9ff;
 background:linear-gradient(155deg,rgba(20,69,132,.96),rgba(38,52,125,.95) 55%,rgba(49,59,133,.97));
 -webkit-backdrop-filter:blur(28px) saturate(170%);
 backdrop-filter:blur(28px) saturate(170%);
 box-shadow:0 20px 50px rgba(0,12,43,.43),inset 0 1px rgba(255,255,255,.33);
 animation:wa-ios-menu-in .22s cubic-bezier(.2,.8,.25,1);
}
@keyframes wa-ios-menu-in{
 from{opacity:.2;transform:translate(-50%,12px) scale(.97)}
 to{opacity:1;transform:translate(-50%,0) scale(1)}
}
.wa-ios-size-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:1px 3px 10px}
.wa-ios-size-heading strong{display:block;font-size:13px;line-height:1.2;font-weight:750}
.wa-ios-size-heading small{display:block;margin-top:3px;color:#bfdfff;font-size:10px}
.wa-ios-menu-close{
 width:28px;height:28px;flex:0 0 28px;border-radius:50%;
 border:1px solid rgba(212,242,255,.4);background:rgba(255,255,255,.12);
 color:white;font-size:21px;display:grid;place-items:center;line-height:1;
}
.wa-ios-size-choices{display:flex;flex-wrap:wrap;gap:7px}
.wa-ios-size-choice{
 flex:1 1 65px;
 min-width:58px;
 max-width:115px;
 min-height:80px;
 padding:8px 5px 7px;
 border-radius:15px;
 background:linear-gradient(150deg,rgba(205,235,255,.20),rgba(115,152,250,.12));
 border:1px solid rgba(176,216,255,.35);
 color:#effaff;
 font:inherit;
 font-weight:750;
 font-size:10px;
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 gap:6px;
 text-align:center;
 -webkit-tap-highlight-color:transparent;
}
.wa-ios-size-choice[aria-pressed="true"]{
 background:linear-gradient(135deg,#237dd6,#466fe9 68%,#7564e1);
 border-color:rgba(190,247,255,.93);
 box-shadow:0 0 0 2px rgba(147,229,255,.15),inset 0 1px rgba(255,255,255,.34);
}
.wa-ios-size-choice:active{transform:scale(.96)}
.wa-ios-size-choice small{display:block;margin-top:2px;font-size:9px;color:#c9e3ff;font-weight:500}
.wa-ios-size-visual{
 width:calc(12px * var(--w) + 6px);
 height:calc(8px * var(--h) + 6px);
 min-width:15px;max-width:36px;max-height:40px;
 border:1.5px solid rgba(245,254,255,.96);
 border-radius:5px;display:block;
 background:linear-gradient(145deg,rgba(174,239,255,.58),rgba(132,152,255,.42));
 box-shadow:inset 0 1px 2px rgba(255,255,255,.38);
}
.wa-ios-size-choice:focus-visible,.wa-ios-menu-close:focus-visible{outline:2px solid #fff;outline-offset:2px}
body.wa-edit-mode #home .content .wa-free-grip{
 width:43px!important;height:43px!important;
 background:linear-gradient(145deg,#157ac8,#6158d1)!important;
 box-shadow:0 6px 16px rgba(0,21,70,.4),inset 0 1px rgba(255,255,255,.52)!important;
 border-color:rgba(220,249,255,.90)!important;
}
body.wa-edit-mode #home .content .wa-free-grip::after{
 content:"GRÖSSE"!important;
 font-size:7px!important;
 bottom:4px!important;
}
body.wa-edit-mode #home .content .wa-free-grip svg{width:19px!important;height:19px!important}
#home .content>[data-wa-block][data-wa-grid-size="xxl"]:not(.mast):not(.studio-teaser){
 min-height:480px!important;
}
#home .content>[data-wa-block][data-wa-grid-size="xl"]:not(.mast):not(.studio-teaser){
 min-height:330px!important;
}
#home .content>.mast[data-wa-grid-size="xxl"]{min-height:500px!important}
#home .content>.mast[data-wa-grid-size="xl"]{min-height:385px!important}
/* Distinct deliberate widget presets, not artificially tall default cards. */
#home .content>[data-wa-block][data-wa-grid-size="tall"]:not(.mast):not(#cards):not(.studio-teaser){min-height:290px!important}
#home .content>[data-wa-block][data-wa-grid-size="large"]:not(.mast):not(#cards):not(.studio-teaser){min-height:220px!important}
#home .content>[data-wa-block][data-wa-grid-size="wide"]:not(.mast):not(#cards):not(.studio-teaser){min-height:150px!important}
@media(max-width:355px){.wa-ios-size-menu{bottom:100px;padding:10px}.wa-ios-size-choice{min-height:67px;flex-basis:54px}}
@media(prefers-reduced-motion:reduce){
 .wa-ios-floating-widget,.wa-ios-size-menu{animation:none!important}
}

/* Stronger than v46's generic intrinsic-size rules: only user-selected XXL grows. */
#home .content>.mast[data-wa-block][data-wa-grid-size="xxl"]{
 min-height:505px!important;
 height:auto!important;
}
#home .content>.mast[data-wa-block][data-wa-grid-size="xl"]{
 min-height:385px!important;
 height:auto!important;
}
#home .content>[data-wa-block][data-wa-grid-size="xxl"]:not(.mast):not(.studio-teaser):not(.wa-hidden){min-height:480px!important}
#home .content>[data-wa-block][data-wa-grid-size="xl"]:not(.mast):not(.studio-teaser):not(.wa-hidden){min-height:330px!important}

/* Keep Done reachable above the app instead of beneath the weather tiles. */
body.wa-edit-mode #home #waDone{
 position:fixed!important;
 top:max(69px,calc(env(safe-area-inset-top,0px) + 19px))!important;
 right:17px!important;
 left:auto!important;
 bottom:auto!important;
 width:auto!important;
 min-width:93px!important;
 min-height:40px!important;
 padding:9px 15px!important;
 border-radius:100px!important;
 z-index:2147483602!important;
 border:1px solid rgba(217,250,255,.91)!important;
 color:#fff!important;
 background:linear-gradient(125deg,#158dd5,#5866ea)!important;
 box-shadow:0 8px 24px rgba(0,22,68,.36),inset 0 1px rgba(255,255,255,.32)!important;
 pointer-events:auto!important;
 opacity:1!important;
}
