:root{
    --brand-logo: 28px;
    --brand-font-size: 18px;
    --brand-font-weight: 800;

    /* Burger rozměr + mezera k logu/názvu */
    --burger-size: 42px;
    --burger-gap: 16px;  /* jak těsně má logo sedět u burgeru */

    
  }


  /* schovat related ikonky */
  .related-widget-wrapper .related-widget-wrapper-link,
  .related-lookup,
  .add-related, .change-related, .delete-related, .view-related,
  a[id^="change_id_"], a[id^="add_id_"], a[id^="delete_id_"], a[id^="view_id_"], a[id^="lookup_id_"]{
    display:none !important;
  }
  .related-widget-wrapper{ gap:0 !important; }

  /* ====== HLAVIČKA – STICKY ====== */
  #header{
    position:sticky !important; top:0; z-index:10000;
    background:var(--bg, #fff); border-bottom:1px solid var(--line, #e5e7eb);
    box-shadow:0 6px 14px rgba(0,0,0,.04);
    padding-left:0 !important; margin-left:0 !important;
    text-align:left !important;   /* přebije mobilní centrování adminu */
    overflow:visible !important;
  }

  /* Branding řádek – vlevo, 100% šířka */
  #branding{
    position:static !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important; padding-left:5px !important; padding-right:0 !important;
    text-align:left !important;
  }
  #site-name{ margin:0 !important; margin-right:auto !important; text-align:left !important; }

  .brand-wrap{
    display:flex; align-items:center; gap:10px;
    justify-content:flex-start !important;
    padding:8px 12px 8px 0 !important;
    margin:0 !important;
    width:100% !important;
  }

  /* Logo + text */
  #branding .brand{
    display:flex; align-items:center; gap:10px; text-decoration:none;
  }
  #branding .brand .brand-logo{ width:var(--brand-logo) !important; height:var(--brand-logo) !important; }
  #branding .brand .brand-title{
    font-size:var(--brand-font-size) !important;
    font-weight:var(--brand-font-weight) !important;
    line-height:1.3 !important;
    padding:.1em 0 !important;
    overflow:visible !important;
  }

  /* user tools vpravo */
  #user-tools{ display:flex; align-items:center; gap:8px; padding-right:12px; }
  #user-tools a{ font-size:13px; white-space:nowrap; }

  /* ikona rozvrhu – vedle Nastavení, stejná výška jako textové buttony */
  .ts-topnav a.schedule-icon{
    display:inline-flex; align-items:center; justify-content:center;
    padding-left:0.75em; padding-right:0.75em; margin:0;
    background:transparent; border:1px solid transparent; border-radius:100px;
    color:var(--text-strong, #111); line-height:0; flex:0 0 auto;
    width:auto; height:auto; min-width:calc(1.15em + 1.5em);
  }
  .ts-topnav a.schedule-icon:hover{ background:#ffedd5; border-color:#ffedd5; color:var(--text-strong, #111); }
  .ts-topnav a.schedule-icon.is-active{ background:var(--brand, #E67817); border-color:var(--brand, #E67817); color:#fff; }
  .ts-topnav a.schedule-icon svg{ width:1.15em; height:1.15em; display:block; color:inherit; }

  /* ====== TOP NAV ====== */
  .ts-topnav{
    display:flex !important; align-items:center; flex-wrap:nowrap;
    gap:8px;
    padding:6px 12px 6px 0 !important;
    overflow:visible !important;
    border-bottom:0;
    background:transparent !important;
  }
  .ts-topnav a{
    flex:0 1 auto; white-space:nowrap; font-weight:900;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:13px; padding:.75rem 1rem;
    border-radius:100px; border:1px solid transparent; text-decoration:none;
    box-sizing:border-box; line-height:1.2;
  }
  .ts-topnav a:hover{ background:#ffedd5; border-color:#ffedd5; }
  .ts-topnav a.is-active{ background:var(--brand, #E67817); border:1px solid var(--brand, #E67817); box-shadow:none; color:#fff; }
  .ts-topnav .divider{ width:1px; height:20px; background:#e5e7eb; align-self:center; }

  /* ====== BURGER – pevně k levému okraji HLAVIČKY ====== */
  #ts-burger{
    display:none; /* default: skryto */
    position:absolute;               /* containing block = #header (sticky) */
    left:12px; top:50%; transform:translateY(-50%);
    margin:0; z-index:10001;
    appearance:none; border:1px solid #e5e7eb; background:#fff; color:#222;
    width:var(--burger-size); height:var(--burger-size);
    border-radius:12px; cursor:pointer;
    align-items:center; justify-content:center;
  }
  #ts-burger svg{ width:22px; height:22px; }
  #ts-burger:focus-visible{ outline:1px solid #f59e0b; outline-offset:1px; }

  /* Když je burger vidět → vlevo rezerva pro LOGO+NÁZEV */
  @media (max-width:1200px){
    #ts-burger{ display:inline-flex !important; }
    #branding{ padding-left: calc(var(--burger-size) + var(--burger-gap)) !important; }
    #branding .brand .brand-title{ font-size:16px !important; }
    .ts-topnav{ display:none !important; }  /* pod 1200px schovej topnav */
  }
  @media (max-width:820px){
    /* Skryje název "Tenis systém Čimice" */
    #branding .brand .brand-title{ display:none; }

    /* TOTO JSME PŘIDALI: Skryje celý blok s odkazy vpravo */
    #user-tools {
      display: none !important;
    }
  }

  /* ====== DRAWER – mobilní menu (vždy stejný vzhled, nic nepřepisuje) ====== */
  .ts-drawer{
    position:fixed !important; inset:0 !important; z-index:10050 !important;
    display:none !important; background:rgba(0,0,0,.86) !important; color:#fff !important;
  }
  .ts-drawer.is-open{ display:block !important; }
  .ts-drawer-panel{
    position:absolute !important; left:0 !important; top:0 !important; bottom:0 !important;
    width:min(90vw, 360px) !important; max-width:360px !important;
    background:#111 !important; border-right:1px solid #222 !important;
    padding:18px 16px 24px !important; overflow:auto !important;
    color:#fff !important;
  }
  .ts-drawer-header{
    display:flex !important; align-items:center !important; justify-content:space-between !important;
    gap:10px !important; margin-bottom:8px !important;
  }
  .ts-drawer-title{
    display:flex !important; align-items:center !important; gap:10px !important;
    font-weight:800 !important; font-size:18px !important; color:#fff !important;
    line-height:1.3 !important;
    overflow:visible !important;
  }
  .ts-drawer-title span{
    line-height:1.3 !important;
    padding:.1em 0 !important;
    overflow:visible !important;
  }
  .ts-drawer-title img{ width:26px !important; height:26px !important; }
  .ts-drawer-close{
    appearance:none !important; border:1px solid #333 !important;
    background:#1a1a1a !important; color:#fff !important;
    width:38px !important; height:38px !important;
    border-radius:10px !important; cursor:pointer !important;
    font-size:18px !important; line-height:1 !important; padding:0 !important;
  }
  .ts-drawer-close:hover{ background:#222 !important; }
  .ts-drawer-close:focus-visible{ outline:2px solid #f59e0b !important; outline-offset:2px !important; }
  .ts-drawer-nav{
    display:block !important;
  }
  .ts-drawer-nav a{
    display:block !important; padding:14px 10px !important; border-radius:10px !important;
    color:#e5e7eb !important; text-decoration:none !important;
    font-size:18px !important; font-weight:700 !important;
    background:transparent !important; border:none !important;
  }
  .ts-drawer-nav a:hover{ background:#1f1f1f !important; color:#fff !important; }
  .ts-drawer-footer{
    border-top:1px solid #222 !important; margin-top:14px !important; padding-top:14px !important;
    display:flex !important; flex-direction:column !important; gap:8px !important;
  }
  .ts-drawer-footer a{
    display:block !important; padding:12px 10px !important; border-radius:10px !important;
    background:#1a1a1a !important; color:#e5e7eb !important;
    text-decoration:none !important; font-weight:800 !important; text-align:center !important;
    border:none !important;
  }
  .ts-drawer-footer a:hover{ background:#222 !important; color:#fff !important; }
