
/*! Kids Family Portal — Light Skin + Mobile Menu + Brand */
:root{
  --kcfp-bg:#f6f7fb; --kcfp-card:#fff; --kcfp-accent:#4f46e5; --kcfp-accent-2:#22c55e;
  --kcfp-text:#0f172a; --kcfp-text-dim:#475569; --kcfp-border:rgba(15,23,42,.10);
  --kcfp-shadow:0 6px 18px rgba(15,23,42,.08); --kcfp-radius:16px; --kcfp-gap:14px;
  --kcfp-logo-base:240px;
}
.kcfp-wrap{ box-sizing:border-box; margin:0 auto; padding:16px; max-width:1100px; color:var(--kcfp-text); line-height:1.5; }

/* Brand */
.kcfp .kcfp-brand{ display:flex; justify-content:center; align-items:center; margin:0 0 8px 0; }
.kcfp .kcfp-brand img{ width:auto; height:auto; display:block; }
@media (max-width:640px){
  /* v3.12 — QR 80px and centered */
  .kcfp .kcfp-pickup{ display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; width:100% !important; text-align:center !important; }
  .kcfp .kcfp-pickup-qr{ display:block !important; margin:0 auto !important; width:80px !important; height:80px !important; }
 .kcfp .kcfp-brand img{ max-height:calc(var(--kcfp-logo-base)*0.68); } }
@media (min-width:641px){ .kcfp .kcfp-brand img{ max-height:calc(var(--kcfp-logo-base)*0.50); } }

/* Tight top spacing */
.kcfp .kcfp-wrap{ margin-top:0 !important; padding-top:6px !important; }
.kcfp .kcfp-wrap > *:first-child{ margin-top:0 !important; }
.kcfp .entry-content, .kcfp .entry-content > *:first-child{ margin-top:0 !important; }

/* Navigation */
.kcfp .kcfp-nav{ margin:12px auto 18px; display:grid; gap:10px; }
.kcfp .kcfp-nav ul{ list-style:none; padding:0; margin:0; }
.kcfp .kcfp-nav a{ display:inline-flex; align-items:center; padding:8px 14px; border-radius:999px;
  text-decoration:none; border:1px solid var(--kcfp-border); background:#fff; color:var(--kcfp-text-dim); }
.kcfp .kcfp-nav a.active{ background:var(--kcfp-accent); color:#fff; border-color:transparent; }
.kcfp .kcfp-nav li.right{ margin-left:auto; }
.kcfp .kcfp-menu-toggle{ display:none; border:1px solid var(--kcfp-border); background:#fff; color:var(--kcfp-text);
  border-radius:12px; padding:10px 14px; font-weight:600; cursor:pointer; align-self:start; }
@media (max-width:640px){
  .kcfp .kcfp-menu-toggle{ display:inline-flex; align-items:center; gap:8px; }
  .kcfp .kcfp-nav ul{ display:none; } .kcfp .kcfp-nav.open ul{ display:grid; gap:10px; }
  .kcfp .kcfp-nav a{ justify-content:space-between; border-radius:12px; padding:12px 14px; color:var(--kcfp-text); }
  .kcfp .kcfp-nav a::after{ content:"›"; font-weight:700; opacity:.35; }
}
@media (min-width:641px){ .kcfp .kcfp-nav ul{ display:flex; flex-wrap:wrap; gap:8px; } }

/* Cards, Forms (compact) */
.kcfp-card{ background:var(--kcfp-card); border:1px solid var(--kcfp-border); border-radius:var(--kcfp-radius); padding:16px; box-shadow:var(--kcfp-shadow); }
.kcfp form .row, .kcfp .form-row{ display:grid; grid-template-columns:1fr; gap:10px; }
@media (min-width:640px){ .kcfp form .row.two, .kcfp .form-row.two{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:920px){ .kcfp form .row.three, .kcfp .form-row.three{ grid-template-columns:repeat(3,1fr); } }
.kcfp input[type=text], .kcfp input[type=email], .kcfp input[type=number], .kcfp input[type=password], .kcfp select, .kcfp textarea{
  width:100%; background:#f8fafc; color:var(--kcfp-text); border:1px solid var(--kcfp-border); border-radius:12px; padding:10px 12px; outline:none;
}
.kcfp input:focus, .kcfp select:focus, .kcfp textarea:focus{ box-shadow:0 0 0 3px rgba(79,70,229,.20); border-color:var(--kcfp-accent); }
.kcfp textarea{ min-height:100px; resize:vertical; }

/* Tables mobile stacked */
.kcfp table{ width:100%; border-collapse:collapse; }
.kcfp th, .kcfp td{ padding:10px; border-bottom:1px solid var(--kcfp-border); }
.kcfp th{ text-align:left; color:var(--kcfp-text); }
@media (max-width:640px){
  .kcfp table thead{ display:none; }
  .kcfp table tr{ display:grid; gap:6px; padding:12px; border:1px solid var(--kcfp-border); border-radius:12px; margin-bottom:10px; }
  .kcfp table td{ display:flex; justify-content:space-between; gap:10px; border:0; padding:6px 0; }
  .kcfp table td::before{ content: attr(data-label); font-weight:600; color:var(--kcfp-text); }
}


/* Mobile nav items full width */
@media (max-width: 640px){
  .kcfp .kcfp-nav ul{ grid-template-columns: 1fr; }
  .kcfp .kcfp-nav li{ width: 100%; }
  .kcfp .kcfp-nav a{ width: 100%; display: flex; }
}
/* Desktop keep inline pills */
@media (min-width: 641px){
  .kcfp .kcfp-nav a{ width: auto; }
}


/* Pickup code + QR */
.kcfp .kcfp-pickup{ display:flex; align-items:center; gap:12px; }
.kcfp .kcfp-pickup-code{ font-weight:600; letter-spacing:.4px; }
.kcfp .kcfp-pickup-qr{ width: 80px !important; height: 80px !important; border-radius:6px; border:1px solid var(--kcfp-border); display:block; }
.kcfp .kcfp-pickup-cell{ vertical-align:middle; }
@media (max-width:640px){
  .kcfp .kcfp-pickup{ flex-direction:column; align-items:center; }
  .kcfp .kcfp-pickup-cell{ text-align:center; }
}


/* Center the Active Check-ins table data on mobile */
@media (max-width:640px){
  .kcfp table.kcfp-checkins-active tr{ display:flex; flex-direction:column; align-items:center; }
  .kcfp table.kcfp-checkins-active td{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:8px 0; }
  .kcfp table.kcfp-checkins-active td::before{ margin-bottom:4px; }
  .kcfp table.kcfp-checkins-active .kcfp-pickup{ flex-direction:column; align-items:center; }
}


/* Strong centering for Active Check-ins on mobile */
@media (max-width:640px){
  .kcfp table.kcfp-checkins-active tr{
    display:grid !important;
    grid-template-columns: 1fr !important;
    justify-items:center !important;
    align-items:center !important;
    text-align:center !important;
    gap:12px !important;
  }
  .kcfp table.kcfp-checkins-active td{
    width:100% !important;
    padding:10px 0 !important;
    display:block !important;
    text-align:center !important;
  }
  .kcfp table.kcfp-checkins-active td::before{
    display:block !important;
    width:100% !important;
    text-align:center !important;
    margin-bottom:6px !important;
  }
  /* Checkbox column goes to the top-right of the card */
  .kcfp table.kcfp-checkins-active td:first-child{
    order: -1;
    display:flex !important;
    justify-content:flex-end !important;
    width:100% !important;
  }
  .kcfp .kcfp-pickup{ flex-direction:column !important; align-items:center !important; }
}


/* Center ALL cells (child, pickup/QR, datetime) in Active Check-ins table on mobile */
@media (max-width:640px){
  .kcfp table.kcfp-checkins-active td{
    text-align:center !important;
    justify-content:center !important;
    align-items:center !important;
  }
  .kcfp table.kcfp-checkins-active td > *{
    margin-left:auto !important;
    margin-right:auto !important;
  }
  /* Child cell (avatar + name) */
  .kcfp table.kcfp-checkins-active td[data-label*="Crian"]{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
  }
  .kcfp table.kcfp-checkins-active td img.avatar,
  .kcfp table.kcfp-checkins-active td .avatar,
  .kcfp table.kcfp-checkins-active td .kcfp-avatar{
    display:block !important;
    margin:0 auto !important;
  }
  .kcfp table.kcfp-checkins-active td .kcfp-child,
  .kcfp table.kcfp-checkins-active td .child,
  .kcfp table.kcfp-checkins-active td .name{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
  }
  /* Pickup block */
  .kcfp .kcfp-pickup{ flex-direction:column !important; align-items:center !important; }
  .kcfp .kcfp-pickup-code{ text-align:center !important; }
  /* Datetime cell */
  .kcfp table.kcfp-checkins-active td[data-label*="Desde"]{ text-align:center !important; }
}


/* v3.11 — Force full centering on mobile + larger QR */
@media (max-width:640px){
  /* Stack and center entire row */
  .kcfp table.kcfp-checkins-active tr{
    display:grid !important;
    grid-template-columns: 1fr !important;
    justify-items:center !important;
    align-items:center !important;
    gap:12px !important;
  }
  /* Center each cell content */
  .kcfp table.kcfp-checkins-active td{
    display:block !important;
    width:100% !important;
    text-align:center !important;
    padding:10px 0 !important;
  }
  /* Center the "label" above the value */
  .kcfp table.kcfp-checkins-active td::before{
    display:block !important;
    width:100% !important;
    text-align:center !important;
    margin:0 0 6px 0 !important;
  }
  /* Child cell: put avatar above name, centered */
  .kcfp table.kcfp-checkins-active td[data-label*="Crian"]{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    gap:8px !important;
  }
  .kcfp table.kcfp-checkins-active td img.avatar,
  .kcfp table.kcfp-checkins-active td .avatar{ margin:0 auto !important; display:block !important; }
  /* Pickup block centered and bigger QR */
  .kcfp .kcfp-pickup{ display:flex !important; flex-direction:column !important; align-items:center !important; gap:10px !important; }
  .kcfp .kcfp-pickup-code{ text-align:center !important; }
  .kcfp .kcfp-pickup-qr{ width: 80px !important; height: 80px !important; }
  /* Datetime centered */
  .kcfp table.kcfp-checkins-active td[data-label*="Desde"]{ text-align:center !important; }
  /* Checkbox cell to top-right */
  .kcfp table.kcfp-checkins-active td:first-child{ order:-1; display:flex !important; justify-content:flex-end !important; }
}

/* Desktop: tiny bump in QR size */
@media (min-width:641px){
  .kcfp .kcfp-pickup-qr{ width: 80px !important; height: 80px !important; }
}


/* v3.13 — hard-center name/photo and datetime on mobile */
@media (max-width:640px){
  /* Child cell (photo + name) */
  .kcfp table.kcfp-checkins-active td[data-label*="Crian"],
  .kcfp table.kcfp-checkins-active td[data-label="Criança"]{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    gap:8px !important;
    width:100% !important;
  }
  .kcfp table.kcfp-checkins-active td[data-label*="Crian"] *{
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
  .kcfp table.kcfp-checkins-active td[data-label*="Crian"] img{ 
    display:block !important; margin:0 auto !important; 
  }
  /* Datetime cell */
  .kcfp table.kcfp-checkins-active td[data-label*="Desde"],
  .kcfp table.kcfp-checkins-active td[data-label="Desde"]{
    text-align:center !important;
    display:block !important;
    width:100% !important;
  }
  .kcfp table.kcfp-checkins-active td[data-label*="Desde"] *{
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}


/* v3.14 — Proper centering for Active Check-ins (uses kcfp-checkins-active) */
@media (max-width:640px){
  .kcfp table.kcfp-checkins-active tr{ display:block !important; text-align:center !important; }
  .kcfp table.kcfp-checkins-active td{ display:block !important; width:100% !important; text-align:center !important; padding:10px 0 !important; }
  .kcfp table.kcfp-checkins-active td::before{ display:block !important; width:100% !important; margin-bottom:6px !important; text-align:center !important; }
  .kcfp table.kcfp-checkins-active .kcfp-child-label{ display:flex !important; flex-direction:column !important; align-items:center !important; gap:8px !important; }
  .kcfp table.kcfp-checkins-active .kcfp-child-name{ display:block !important; text-align:center !important; }
  .kcfp table.kcfp-checkins-active td[data-label*="Desde"]{ text-align:center !important; }
  .kcfp table.kcfp-checkins-active .kcfp-pickup{ display:flex !important; flex-direction:column !important; align-items:center !important; }
  .kcfp table.kcfp-checkins-active .kcfp-pickup-qr{ width:80px !important; height:80px !important; display:block !important; margin:0 auto !important; }
  .kcfp table.kcfp-checkins-active td:first-child{ display:flex !important; justify-content:flex-end !important; }
}
