/*
Theme Name: FAMIVO Theme
Theme URI: https://famivo.ch
Author: FAMIVO
Description: Responsive FAMIVO family dashboard demo for HOME 24, HOME 15, tablets, smartphones and desktops. Demo data is stored locally in the browser; requires FAMIVO Core for real accounts and sync.
Version: 2.5.0
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: famivo
*/
:root{--ink:#17324d;--muted:#718092;--blue:#2777e8;--bg:#f4f7fb;--card:#fff;--line:#e7edf4;--shadow:0 8px 28px rgba(20,47,78,.06)}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #81b4ff;outline-offset:2px}.app{display:flex;min-height:100vh}.side{width:205px;background:white;border-right:1px solid var(--line);padding:26px 15px;flex-shrink:0;display:flex;flex-direction:column;gap:25px}.brand{font-size:27px;font-weight:850;letter-spacing:-1px;display:flex;align-items:center;gap:8px}.brandmark{font-size:27px;color:#24486a}.tagline{font-size:10px;color:var(--muted);letter-spacing:.1px}.nav{display:grid;gap:7px}.nav button{display:flex;align-items:center;gap:12px;text-align:left;border:0;border-radius:10px;background:transparent;color:#30435c;padding:12px 13px;font-size:14px}.nav button.active,.nav button:hover{background:#e9f2ff;color:#1763d4}.nav .symbol{font-size:19px;width:23px;text-align:center}.main{flex:1;min-width:0;padding:26px clamp(15px,2.5vw,42px) 40px}.top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:22px}.top h1{font-size:clamp(20px,2vw,29px);margin:0}.sub{color:var(--muted);font-size:13px;margin:5px 0 0}.topright{display:flex;align-items:center;gap:10px}.datebtn,.iconbtn,.primary,.secondary{border:1px solid var(--line);background:white;border-radius:9px;padding:9px 12px;color:var(--ink)}.iconbtn{padding:8px 12px}.primary{background:var(--blue);border-color:var(--blue);color:white}.secondary{background:#edf4ff;color:#2468ca}.weather{font-size:15px;white-space:nowrap}.panel{background:var(--card);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow);padding:17px}.panel h2{font-size:16px;margin:0 0 13px}.section{display:none}.section.active{display:block}.calendar{padding:0;overflow:hidden}.calendarhead{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid var(--line)}.dayhead{padding:13px 8px;text-align:center;border-right:1px solid var(--line);font-size:13px;font-weight:700}.dayhead:last-child{border-right:0}.days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));min-height:290px}.day{border-right:1px solid var(--line);padding:9px 6px;display:flex;flex-direction:column;gap:7px;min-width:0}.day:last-child{border:0}.event{border:0;text-align:left;padding:9px 7px;border-radius:7px;font-size:12px;line-height:1.35;overflow-wrap:anywhere;color:#28445c}.event:hover{filter:brightness(.97)}.e0{background:#dcecff}.e1{background:#f5dff6}.e2{background:#dcf3df}.e3{background:#ffedcf}.e4{background:#d9f2f4}.e5{background:#eadff9}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-top:17px}.line{display:flex;align-items:center;gap:9px;font-size:13px;padding:8px 0;border-bottom:1px solid #f0f3f7}.line:last-child{border:0}.line input[type=checkbox]{accent-color:#2777e8;width:17px;height:17px}.line .owner{margin-left:auto;font-size:11px;background:#eef3f8;border-radius:99px;padding:4px 7px;white-space:nowrap}.done{text-decoration:line-through;color:#8c98a6}.meal{padding:8px 0;border-bottom:1px solid #eef1f5;font-size:13px}.meal:last-child{border:0}.meal strong{display:inline-block;min-width:30px;color:#2777e8}.quick{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.hint{font-size:12px;color:var(--muted);line-height:1.5}.sectiongrid{display:grid;grid-template-columns:2fr 1fr;gap:15px}.formrow{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:15px}.formrow input,.formrow select{padding:10px;border:1px solid #d9e2ed;border-radius:9px;min-width:0;max-width:100%;background:white}.formrow input[type=text]{flex:1;min-width:150px}.listpanel{max-width:820px}.listpanel .line{font-size:15px}.delete{border:0;background:transparent;color:#a24c53;margin-left:auto;font-size:16px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.pill{display:inline-block;background:#e8f2ff;color:#2777e8;border-radius:20px;padding:5px 10px;font-size:12px}.bottomnav{display:none}.demo{margin-top:auto;padding:12px;background:#f2f6fb;border-radius:10px;font-size:11px;color:#64768b;line-height:1.5}.welcome{font-size:14px;color:#64768b;margin:0 0 17px}.empty{font-size:13px;color:#8290a0;padding:10px 0}.familytile{display:inline-flex;align-items:center;gap:8px;background:#f2f6fc;border-radius:10px;padding:12px;margin:5px;font-size:14px}.avatar{width:26px;height:26px;border-radius:50%;display:inline-grid;place-items:center;background:#dcecff}.notice{border-left:3px solid #2777e8;padding:12px;background:#f0f6ff;font-size:13px;margin-bottom:15px}footer{font-size:11px;color:#8997a7;margin-top:18px}body.wall .side,body.wall .bottomnav{display:none}body.wall .main{padding:18px}body.wall .cards{grid-template-columns:repeat(4,minmax(0,1fr))}body.wall .days{min-height:38vh}body.wall .top{margin-bottom:12px}@media(max-width:1200px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.side{width:175px}.event{font-size:11px;padding:7px 5px}}@media(max-width:850px){.side{display:none}.main{padding:18px 16px 90px}.bottomnav{display:flex;position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid var(--line);justify-content:space-around;z-index:10;padding:7px 4px max(7px,env(safe-area-inset-bottom))}.bottomnav button{border:0;background:none;color:#657b94;display:grid;gap:2px;justify-items:center;font-size:10px;min-width:0;padding:5px}.bottomnav button.active{color:#1763d4}.bottomnav .symbol{font-size:20px}.sectiongrid{grid-template-columns:1fr}.weather{display:none}}@media(max-width:600px){.cards{grid-template-columns:1fr}.top{align-items:flex-start}.topright{gap:4px}.datebtn{font-size:11px;padding:8px}.top h1{font-size:21px}.calendar{overflow-x:auto}.calendarhead,.days{min-width:630px}.days{min-height:230px}.dayhead{font-size:11px}.event{font-size:11px}.panel{padding:13px}.calendar{padding:0}.topright .iconbtn{padding:7px}.main{padding:15px 12px 85px}body.wall .main{padding:12px 12px 85px}body.wall .cards{grid-template-columns:1fr}}@media(min-width:851px) and (max-width:1400px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s ease}}

/* FAMIVO brand logo V1.1 */
.brand{display:block;line-height:1}.famivo-logo{display:block;width:100%;height:auto;max-width:170px;object-fit:contain}.mobile-brand{display:none}.mobile-brand img{width:128px;height:auto;display:block}@media(max-width:850px){.mobile-brand{display:block;margin:0 0 14px}}

/* v1.2: self-contained inline SVG logo, no external asset dependency */
.brand{display:block;min-height:120px}.famivo-logo-svg{display:block;width:100%;max-width:170px;height:auto;overflow:visible}.mobile-brand .famivo-logo-svg{max-width:135px}.mobile-brand{margin-bottom:12px}

/* V1.3: stable logo layout */
.side .brand{width:100%;min-height:0;margin-bottom:4px}.side .famivo-logo-svg{max-width:170px;width:100%;height:auto;overflow:hidden}.mobile-brand .famivo-logo-svg{max-width:135px}

/* V1.4 – mobile-first refinements; desktop and tablet retain the weekly grid */
.mobile-settings,.mobile-daybar,.mobile-quicklinks,.mobile-day-calendar{display:none}
@media(max-width:600px){
 .main{padding:12px 13px 100px}
 .mobile-brand{display:flex;align-items:center;justify-content:space-between;margin:0 0 13px;min-height:54px}
 .mobile-brand .famivo-logo-svg{width:104px;max-width:104px;height:auto}
 .mobile-settings{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:20px}
 .top{display:block;margin-bottom:12px}
 .top h1{font-size:22px;line-height:1.2}
 .top .sub{font-size:12px;margin:3px 0 0}
 .topright{margin-top:12px;justify-content:flex-start;gap:7px}
 .topright .datebtn,.topright .iconbtn{font-size:13px;padding:8px 12px;min-height:38px}
 #wall-toggle{display:none}
 .welcome{font-size:12px;margin:0 0 12px}
 .welcome .pill{font-size:10px}
 .mobile-daybar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 9px}
 .mobile-daybar strong{display:block;font-size:15px}
 .mobile-daybar span{display:block;font-size:11px;color:var(--muted);margin-top:2px}
 .mobile-week-link{background:transparent;border:0;color:var(--blue);font-size:12px;white-space:nowrap;padding:8px 0}
 #section-overview .calendarhead,#section-overview .days{display:none}
 #section-overview .calendar{overflow:visible;min-height:0;padding:11px 13px;border-radius:14px}
 #section-overview .mobile-day-calendar{display:block}
 .mobile-event-row{display:flex;align-items:center;gap:12px;margin:6px 0}
 .mobile-event-time{font-size:12px;color:var(--muted);width:43px;flex-shrink:0}
 .mobile-event-item{flex:1;border-radius:9px;padding:10px 12px;font-size:13px;font-weight:600}
 .mobile-event-item small{display:block;font-size:10px;font-weight:400;opacity:.7;margin-top:2px}
 .mobile-quicklinks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
 .mobile-quicklinks button{border:1px solid var(--line);background:#fff;border-radius:13px;text-align:left;padding:13px;display:grid;gap:4px;min-width:0;color:var(--ink)}
 .mobile-quicklinks button span{font-size:21px;color:var(--blue)}
 .mobile-quicklinks button strong{font-size:13px}
 .mobile-quicklinks button small{font-size:11px;color:var(--muted)}
 #section-overview .cards{margin-top:12px;gap:11px}
 #section-overview .panel{padding:14px}
 #section-overview .line{padding:8px 0}
 .bottomnav{padding:6px 2px max(8px,env(safe-area-inset-bottom));box-shadow:0 -3px 14px rgba(23,50,77,.04)}
 .bottomnav button{font-size:10px;gap:3px;padding:5px 2px}
 .bottomnav .symbol{font-size:21px}
 #section-calendar .calendar{overflow-x:auto}
 #section-calendar .calendarhead,#section-calendar .days{min-width:630px}
}
@media(min-width:601px) and (max-width:850px){.mobile-brand .famivo-logo-svg{max-width:115px}.top{flex-wrap:wrap}}

/* V2.1: WordPress page content and shortcode rendering */
.famivo-wp-page{min-height:100vh;padding:clamp(20px,4vw,52px);max-width:1100px;margin:0 auto}
.famivo-wp-header{margin-bottom:22px}.famivo-wp-home{color:#2468ca;text-decoration:none;font-weight:600}
.famivo-wp-home:hover{text-decoration:underline}.famivo-wp-card{background:#fff;border:1px solid #e7edf4;border-radius:16px;padding:clamp(20px,3vw,36px);box-shadow:0 8px 28px rgba(20,47,78,.06)}
.famivo-wp-card h1{margin:0 0 22px;font-size:clamp(23px,3vw,32px)}.famivo-wp-content{overflow-wrap:anywhere;line-height:1.6}.famivo-wp-content input,.famivo-wp-content button{max-width:100%}

#member-form input[type=color]{width:55px;min-width:55px;height:43px;padding:3px}#famivo-sync-label{font-size:.85em}

body.wall #overview-calendar .famivo-normal-calendar{display:none!important}
body:not(.wall) .famivo-wall-calendar{display:none!important}
body.wall .famivo-wall-calendar{padding:16px 18px 18px;overflow:hidden}
.famivo-wall-head{display:grid;grid-template-columns:68px repeat(7,minmax(0,1fr));align-items:center;min-height:44px;border-bottom:1px solid #e7edf4}
.famivo-wall-time-label{font-size:12px;color:#8492a5;text-align:center}
.famivo-wall-day-title{text-align:center;font-size:14px;font-weight:600;padding:10px 2px;border-left:1px solid #edf1f6}
.famivo-wall-grid{display:grid;grid-template-columns:68px repeat(7,minmax(0,1fr));position:relative;height:clamp(370px,48vh,570px)}
.famivo-wall-axis{position:relative}
.famivo-wall-axis span{position:absolute;left:0;right:8px;transform:translateY(-50%);font-size:12px;color:#96a2b2;text-align:right}
.famivo-wall-column{position:relative;min-width:0;border-left:1px solid #e8edf3;background:repeating-linear-gradient(to bottom,#f0f4fa 0,#f0f4fa calc(12.5% - 5px),#fff calc(12.5% - 5px),#fff 12.5%)}
.famivo-wall-column .event{position:absolute;left:4px;right:4px;width:calc(100% - 8px);min-height:32px;max-height:62px;z-index:2;text-align:left;white-space:normal;overflow:hidden}
.famivo-wall-now{position:absolute;border-top:2px solid #ed656a;z-index:4;pointer-events:none}
.famivo-wall-now:before{content:"";position:absolute;left:-4px;top:-5px;width:9px;height:9px;background:#ed656a;border-radius:50%}
@media(max-width:900px){body.wall .famivo-wall-calendar{overflow-x:auto}.famivo-wall-head,.famivo-wall-grid{min-width:760px}}

.famivo-home-header{display:none}body.wall .famivo-home-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 24px;background:#f4f7fb;border-bottom:1px solid #e7edf4}body.wall .famivo-home-brand{display:grid;gap:2px}body.wall .famivo-home-brand strong{font-size:23px;letter-spacing:.06em}body.wall .famivo-home-brand small{font-size:12px;color:#8793a2}body.wall .famivo-home-right{display:flex;align-items:center;gap:20px}body.wall #famivo-wall-clock{font-size:30px;font-weight:600}body.wall #famivo-wall-exit{border:1px solid #e4eaf4;background:#edf4ff;color:#3775c5;border-radius:9px;padding:10px 15px}body.wall .top,body.wall .welcome{display:none!important}body.wall .main{padding-top:12px!important}body.wall .famivo-wall-calendar{margin-top:0}body.wall #overview-calendar .famivo-normal-calendar{display:none!important}

/* V2.5: restore original HOME header and wall-mode presentation without altering normal mode */
body.wall.admin-bar #wpadminbar{display:none!important}
html:has(body.wall){margin-top:0!important}
body.wall .famivo-home-header{display:flex;min-height:96px;padding:15px 24px;gap:16px;align-items:center;justify-content:space-between}
body.wall .famivo-home-brand{display:flex;align-items:center;gap:18px;flex-shrink:0}
body.wall .famivo-wall-logo{width:130px;height:68px;object-fit:contain}
body.wall .famivo-wall-home-name{border-left:1px solid #e4eaf1;padding-left:18px;font-weight:700;font-size:20px;letter-spacing:.12em}
body.wall .famivo-home-right{display:flex;align-items:center;gap:22px;white-space:nowrap}
body.wall #famivo-wall-date{font-size:16px;color:#536477}
body.wall #famivo-wall-clock{font-size:30px;font-weight:500}
body.wall .famivo-wall-weather{font-size:13px;color:#8996a7}
body.wall .famivo-wall-day-title.is-today{background:#e8f1ff;color:#2768b5;border-radius:10px}
body.wall .famivo-wall-calendar{padding:16px 18px 18px}
body.wall .famivo-wall-grid{height:clamp(370px,48vh,570px)}
body.wall .cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body.wall .main{padding:12px 20px 30px!important}
body.wall footer{display:none}
@media(max-width:900px){body.wall .famivo-home-header{padding:10px 14px;flex-wrap:wrap}body.wall .famivo-home-right{gap:12px}body.wall .famivo-wall-logo{width:95px;height:55px}body.wall .famivo-wall-home-name{font-size:16px}body.wall .cards{grid-template-columns:repeat(4,minmax(170px,1fr))!important;overflow-x:auto}body.wall .main{padding:10px!important}}

/* V2.6: inline SVG brand ensures logo is rendered without asset URL */
body.wall .famivo-home-brand .famivo-wall-logo-svg{display:block!important;width:130px!important;height:70px!important;max-width:none!important;flex:0 0 130px;overflow:visible!important}
@media(max-width:900px){body.wall .famivo-home-brand .famivo-wall-logo-svg{width:105px!important;height:60px!important;flex-basis:105px}}
