/* Calyon — CELULAR v3 (completo)
   Cobre: home pública (Início, Sobre, Avaliações, Local, Aulas), avaliacoes.php, aulas.php,
   formulário de avaliação e o painel do proprietário.
   Só atua em telas pequenas — o computador não muda.
   Carregado por includes/mobile_head.php (depois de mobile_global.css e admin_mobile.css). */

/* =====================================================================
   1) HOME PÚBLICA — cabeçalho, barra inferior e seções
   ===================================================================== */
@media(max-width:768px){
  body.bo-home{overflow-x:hidden;padding-top:calc(var(--hm-head,54px) + env(safe-area-inset-top,0px))!important}

  /* cabeçalho: respeita o "notch" e cabe em 320px */
  body.bo-home .hm-header{box-sizing:border-box;height:calc(var(--hm-head,54px) + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px)}
  body.bo-home .hm-header-in{height:var(--hm-head,54px);gap:8px}
  body.bo-home .hm-wrap{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
  body.bo-home .hm-brand{flex:1 1 auto;min-width:0}
  body.bo-home .hm-brand strong{font-size:14px}
  body.bo-home .hm-actions{flex:0 0 auto;gap:6px}
  body.bo-home .hm-link{width:40px;height:40px}
  body.bo-home .hm-btn-sm{height:40px;font-size:12px}

  /* a tela inicial ocupa a altura útil real (topo + barra inferior + áreas seguras) */
  body.bo-home .hm-hero{min-height:calc(100dvh - var(--hm-head,54px) - env(safe-area-inset-top,0px) - var(--hm-tab,64px) - env(safe-area-inset-bottom,0px) - 28px)}

  /* BARRA INFERIOR: aceita 3, 4, 5, 6 ou 7 itens sem quebrar linha */
  body.bo-home .hm-tabbar{
    display:grid!important;
    grid-template-columns:none!important;
    grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
    left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));
    bottom:calc(8px + env(safe-area-inset-bottom,0px));
    height:auto;min-height:var(--hm-tab,64px);padding:5px;gap:2px;box-sizing:border-box;
  }
  body.bo-home .hm-tabbar [hidden]{display:none!important}
  body.bo-home .hm-tabbar>button,body.bo-home .hm-tabbar>a{
    min-width:0;min-height:50px;padding:4px 2px;gap:3px;border-radius:14px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    font-size:11px;line-height:1.1;text-align:center;text-decoration:none;
  }
  body.bo-home .hm-tabbar>button i,body.bo-home .hm-tabbar>a i{font-size:17px}
  body.bo-home .hm-tabbar>button>span,body.bo-home .hm-tabbar>a>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* muitas abas: rótulo um pouco menor, para "Avaliações" caber inteiro */
  body.bo-home .hm-tabbar[data-count="6"]>button,body.bo-home .hm-tabbar[data-count="6"]>a,
  body.bo-home .hm-tabbar[data-count="7"]>button,body.bo-home .hm-tabbar[data-count="7"]>a{font-size:9.5px;padding-left:1px;padding-right:1px;letter-spacing:-.01em}
  body.bo-home .hm-tabbar[data-count="7"]>button,body.bo-home .hm-tabbar[data-count="7"]>a{font-size:8.5px}
  body.bo-home .hm-tabbar>button.on,body.bo-home .hm-tabbar>a.on{color:var(--hm-acc);background:color-mix(in srgb,var(--color-text) 9%,transparent)}

  /* textos mais legíveis dentro dos cartões */
  body.bo-home .hm-card p{font-size:14px;line-height:1.7}
  body.bo-home .hm-card h3{font-size:18px}
  body.bo-home .hm-h{font-size:12px}
  body.bo-home .hm-chip{font-size:12px}
  body.bo-home .hm-points{font-size:12px}
  body.bo-home .hm-owner{font-size:12px}
  body.bo-home .hm-tm-bio{font-size:12px}
  body.bo-home .hm-foot{font-size:12px;padding-bottom:12px}

  /* SOBRE (aba Experiência) */
  body.bo-home .exp-texto p{font-size:15px;line-height:1.75}
  body.bo-home .exp-galeria{gap:8px}
  body.bo-home .exp-foto{border-radius:14px}

  /* LOCAL (aba Onde estamos) */
  body.bo-home .hm-info{font-size:14px;gap:14px}
  body.bo-home .hm-info li{overflow-wrap:anywhere}
  body.bo-home .hm-row-btns{flex-direction:column;gap:10px}
  body.bo-home .hm-row-btns .hm-btn{width:100%;box-sizing:border-box;height:48px;font-size:13px}
  body.bo-home .hm-map{min-height:260px}
  body.bo-home .hm-map iframe{min-height:248px}

  /* AVALIAÇÕES (aba e resumo da Início) */
  body.bo-home .hm-av-head{flex-direction:column;align-items:stretch;gap:12px}
  body.bo-home .hm-av-head h2{font-size:21px;line-height:1.25}
  body.bo-home .hm-av-head .hm-btn{width:100%;box-sizing:border-box;height:48px}
  body.bo-home .hm-av-sum{font-size:14px}
  body.bo-home .hm-av-dist{max-width:none}
  body.bo-home .hm-av-bar{font-size:13px;gap:10px;margin:7px 0}
  body.bo-home .hm-av-bar i{height:10px}
  body.bo-home .hm-av-bar em{width:32px}

  /* janela do profissional: usa a altura real da tela */
  .bo-prof-dialog{max-height:calc(100dvh - 24px)!important}
  .bo-prof-close{width:44px!important;height:44px!important}
}
@media(max-width:340px){
  body.bo-home .hm-brand strong{max-width:none}
  body.bo-home .hm-btn-sm{padding:0 10px}
}

/* telas estreitas (320–350px): barra inferior mais compacta para caber "Avaliações" inteiro */
@media(max-width:350px){
  body.bo-home .hm-tabbar{left:max(4px,env(safe-area-inset-left,0px));right:max(4px,env(safe-area-inset-right,0px));padding:4px 3px;gap:0}
  body.bo-home .hm-tabbar[data-count="5"]>button,body.bo-home .hm-tabbar[data-count="5"]>a{font-size:10px}
  body.bo-home .hm-tabbar[data-count="6"]>button,body.bo-home .hm-tabbar[data-count="6"]>a{font-size:9px;letter-spacing:-.02em}
  body.bo-home .hm-tabbar[data-count="7"]>button,body.bo-home .hm-tabbar[data-count="7"]>a{font-size:8px;letter-spacing:-.02em}
}

/* =====================================================================
   2) AVALIAÇÕES (cartões, página avaliacoes.php e formulário)
   ===================================================================== */
.cav-grid{grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr))}
@media(max-width:700px){
  .cav-grid{grid-template-columns:minmax(0,1fr)}
  .cav-card{padding:14px;border-radius:16px}
  .cav-nome{font-size:15px}
  .cav-meta{font-size:13px}
  .cav-txt{font-size:15px;line-height:1.6}
  .cav-badge{font-size:11px}
  .cav-midias{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cav-admin button{min-height:42px;font-size:13px;padding:8px 14px}
  .cav-lb{padding:calc(12px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px))}
  .cav-lb button{width:46px;height:46px;top:calc(12px + env(safe-area-inset-top,0px));right:12px}

  /* página pública de avaliações */
  .vp-wrap{padding:calc(14px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) calc(48px + env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px))}
  .vp-top{flex-wrap:wrap;margin-bottom:14px}
  .vp-top a{min-height:44px;display:inline-flex;align-items:center;font-size:14px}
  .vp-top a.vp-btn{padding:0 20px;font-size:12px!important}
  .vp-wrap h1{font-size:23px;line-height:1.2;margin-bottom:12px}
  .vp-sum{padding:16px;border-radius:18px;gap:14px}
  .vp-media b{font-size:44px}
  .vp-media small{font-size:13px}
  .vp-bar{font-size:13px;gap:10px;margin:7px 0}
  .vp-bar i{height:10px}
  .vp-bar em{width:30px}
  /* filtros em uma faixa que rola para o lado (não ocupa 4 linhas) */
  .vp-chips{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;margin-left:-14px;margin-right:-14px;padding:2px 14px 8px;scrollbar-width:none}
  .vp-chips::-webkit-scrollbar{display:none}
  .vp-chip{flex:0 0 auto;min-height:42px;display:inline-flex;align-items:center;font-size:13px;white-space:nowrap}
  .vp-pag{gap:8px;flex-wrap:wrap}
  .vp-pag a,.vp-pag span{min-height:44px;display:inline-flex;align-items:center}
  .vp-vazio{padding:32px 14px;font-size:14px}

  /* formulário de avaliação */
  .av-star{font-size:min(44px,11.5vw);padding:2px}
  .av-stars{gap:2px}
  .av-lbl{font-size:12px}
  .av-drop{min-height:56px;font-size:14px}
  .av-hint{font-size:12px}
  .av-send{min-height:52px;font-size:16px}
}

/* =====================================================================
   3) PAINEL DO PROPRIETÁRIO — topo, textos legíveis, tabelas, componentes
   ===================================================================== */
@media(max-width:900px){
  html body.admin-page{overflow-x:hidden}

  /* ---------- topo: [☰] [logo + nome] [🔔] [🏆] [Sair] numa linha só ---------- */
  html body.admin-page .admin-topbar{height:auto!important;padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px))!important}
  html body.admin-page .admin-topbar>div{display:flex;flex-wrap:nowrap;align-items:center;gap:8px}
  html body.admin-page .admin-topbar .bo-mobile-menu-trigger{order:0;flex:0 0 auto}
  html body.admin-page .admin-topbar>div>a:first-child{order:1;flex:1 1 0;min-width:0;max-width:none;gap:8px!important}
  html body.admin-page .admin-topbar>div>a:first-child img,html body.admin-page .admin-topbar>div>a:first-child>div{width:34px;height:34px;flex:0 0 34px}
  html body.admin-page .admin-topbar-title{font-size:13px!important;letter-spacing:.02em!important;max-width:100%}
  html body.admin-page .admin-topbar-actions{order:2;flex:0 0 auto;gap:6px!important;flex-wrap:nowrap}
  html body.admin-page .admin-topbar-actions>button,html body.admin-page .admin-topbar-actions>a{min-height:42px;min-width:42px;padding:0 12px!important;font-size:13px!important;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
  html body.admin-page .admin-topbar-actions .hide-mobile{display:none!important}

  /* ---------- textos: nada menor que 12px ---------- */
  html body.admin-page:has(.admin-shell) .admin-main .text-xs{font-size:13px!important;line-height:1.45}
  html body.admin-page .admin-main .text-\[9px\]:not(.rounded-full),
  html body.admin-page .admin-main .text-\[10px\]:not(.rounded-full){font-size:12px!important;line-height:1.4}
  html body.admin-page .admin-main .text-\[11px\]{font-size:12.5px!important}
  html body.admin-page:has(.admin-shell) .admin-main>.space-y-6>div:first-child p{font-size:13px!important;line-height:1.5}
  html body.admin-page:has(.admin-shell) .admin-main .text-2xl{font-size:22px!important}
  html body.admin-page .admin-main .text-sm{font-size:14px}
  html body.admin-page .bo-owner-return{font-size:12px!important}

  /* cartão "Dashboard" e notificações */
  .dc-dash-kicker,.dc-notify-kicker{font-size:11px!important}
  .dc-dash-card h2,.dc-notify-panel h2{font-size:19px}
  .dc-dash-card p{font-size:12.5px!important}
  .dc-dash-stats small{font-size:10px!important}
  .dc-dash-stats strong{font-size:16px!important}
  .dc-dash-open{font-size:13px!important}
  .dc-notify-panel p{font-size:13px!important}
  .dc-notify-btn{font-size:13px!important;min-height:46px}
  .dc-notify-item strong{font-size:13px!important}
  .dc-notify-item small{font-size:11px!important}
  .dc-notify-item button{font-size:12px!important;min-height:42px;padding:8px 12px!important}

  /* semana (agenda) */
  .week-head small{font-size:11px!important}
  .week-head strong{font-size:14px!important}
  .week-event time{font-size:12px!important}
  .week-event b{font-size:13px!important}
  .week-event span{font-size:11.5px!important}
  .week-hint,body.admin-page .ag-mobile .week-hint{font-size:12px!important}
  body.admin-page .ag-mobile .week-head small,body.admin-page .ag-mobile .week-event span{font-size:11px!important}
  body.admin-page .ag-mobile .week-event b{font-size:12px!important}
  body.admin-page .ag-mobile #weekCount{font-size:12px!important}

  /* dashboards por atividade (cseg-*) */
  .cseg-kicker{font-size:11px!important}
  .cseg-hero p{font-size:13px!important}
  .cseg-hero-badge strong{font-size:12px!important}
  .cseg-hero-actions a{font-size:13px!important;min-height:46px}
  .cseg-metric small,.cseg-metric span,.cseg-focus-stats small,.cseg-panel-head span,.cseg-list-item small,.cseg-focus-copy span{font-size:11px!important}
  .cseg-focus-copy p,.cseg-list-item strong,.cseg-alerts a{font-size:13px!important}
  .cseg-alerts a b,.cseg-empty,.cseg-rank,.cseg-avatar{font-size:12px!important}

  /* componentes gerais do painel */
  .bo-kpi .label,.bo-chip,.bo-table th{font-size:11px!important}
  .bo-rank .meta{font-size:12px!important}
  .bo-eyebrow,.bo-admin-nav-title{font-size:11px!important}

  /* gaveta de notificações */
  .bo-notify-kicker{font-size:10px!important}
  .bo-notify-head p,.bo-notify-copy small{font-size:12px!important}
  .bo-notify-copy strong{font-size:13.5px!important}
  .bo-notify-more a{font-size:13px!important;min-height:44px;display:inline-flex;align-items:center}
  .bo-notify-close{width:44px!important;height:44px!important}
  .bo-notify-empty span{font-size:13px!important}

  /* menu lateral do celular (hambúrguer) */
  .bo-mobile-menu{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  .bo-mobile-menu a,.bo-mobile-group summary{font-size:14px!important}
  .bo-mobile-group>div a{font-size:13px!important}
  .bo-mobile-menu .bo-menu-caption{font-size:11px!important}
  .bo-mobile-menu-close{width:44px!important;height:44px!important}

  /* ---------- tabelas viradas em cartão: sem largura mínima ---------- */
  table.cy-stack,.admin-main table.cy-stack,.admin-main .table-custom.cy-stack,.bo-table.cy-stack{min-width:0!important;width:100%!important}
  table.cy-stack td{font-size:14px!important;padding:7px 0!important}
  table.cy-stack td::before{font-size:12px!important}
  table.cy-stack td>a,table.cy-stack td>button,table.cy-stack td form{min-height:40px}

  /* ---------- toques confortáveis ---------- */
  html body.admin-page .admin-main :is(button,a)[class*="px-"][class*="py-"]{min-height:42px;display:inline-flex;align-items:center;justify-content:center}
  html body.admin-page .admin-main label{font-size:13px}
  html body.admin-page .admin-main summary{min-height:44px}

  /* janelas e gavetas nunca passam da tela */
  .bo-notify-drawer{max-width:100%}
  .bo-notify-body{padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:380px){
  html body.admin-page .admin-topbar-title{font-size:12px!important}
  html body.admin-page .admin-topbar-actions>button,html body.admin-page .admin-topbar-actions>a{padding:0 9px!important}
}

/* =====================================================================
   4) TELAS DE APOIO DO PROPRIETÁRIO (aulas, planos, recursos)
   ===================================================================== */
@media(max-width:760px){
  body.cy-owner .wrap{padding:calc(16px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) calc(48px + env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px))}
  body.cy-owner h1{font-size:23px;line-height:1.2}
  body.cy-owner h2{font-size:19px}
  body.cy-owner .card{padding:16px;border-radius:18px}
  body.cy-owner .muted{font-size:14px;line-height:1.55}
  body.cy-owner .btn,body.cy-owner button.btn{min-height:48px;width:100%;font-size:15px}
  body.cy-owner .lesson video{aspect-ratio:16/9;object-fit:contain}
  body.cy-owner .lesson form .btn{width:100%}
  body.cy-owner a.muted{display:inline-flex;align-items:center;min-height:44px}
}

/* =====================================================================
   5) HOME — horários (hr-*), carrossel (cf-*) e textos pequenos
   ===================================================================== */
@media(max-width:768px){
  .hr-st-title{font-size:16px}
  .hr-st-sub{font-size:12.5px}
  .hr-cta{font-size:12px!important;min-height:44px!important;padding:0 14px!important}
  .hr-tl{--hr-lab:88px}
  .hr-head{height:34px}
  .hr-row{height:46px}
  .hr-day{font-size:13px}
  .hr-time{font-size:11px;letter-spacing:0;white-space:nowrap}
  .hr-mark{font-size:11px}
  .hr-now span{font-size:10px}
  .hr-legend{font-size:12px;gap:8px 14px}
  .hr-folgas,.hr-folgas strong{font-size:13px}
  .hr-chip{font-size:12px;padding:6px 11px}
  .hr-block{font-size:11px}
  .cf-desc{font-size:14px;line-height:1.55}
  .cf-dur{font-size:12px}
  .cf-vbadge{font-size:11px}
  .cf-nav{width:44px;height:44px}
  .hs-lbl,.hs-rodape{font-size:12px}
  .hs-titulo{font-size:12px}
  .hm-tm small{font-size:12px}
}
@media(max-width:360px){
  .hr-tl{--hr-lab:76px}
  .hr-time{font-size:10.5px}
  .hr-mark{font-size:10px}
}
