/*
Theme Name: BTBS Lite
Theme URI: https://example.com/
Author: BTBS
Description: Lightweight WordPress theme designed for Bali Tour Booking System. Minimal shell, no external fonts, no JavaScript framework, and no duplicated header/footer when BTBS is active.
Version: 1.0.2
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: btbs-lite
License: GPL-2.0-or-later
*/

:root{
  --btbsl-primary:#f97316;
  --btbsl-text:#172033;
  --btbsl-muted:#667085;
  --btbsl-page:#ffffff;
  --btbsl-surface:#ffffff;
  --btbsl-border:#e5e7eb;
  --btbsl-header-bg:#ffffff;
  --btbsl-header-text:#172033;
  --btbsl-footer-bg:#0f172a;
  --btbsl-footer-text:#e5e7eb;
  --btbsl-container:1180px;
  --btbsl-pad:24px;
  --btbsl-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--btbsl-page);color:var(--btbsl-text);font-family:var(--btbsl-font);font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{max-width:100%;height:auto}
.btbsl-site-main:not(.btbsl-site-main--full) a{color:var(--btbsl-primary);text-decoration-thickness:.08em;text-underline-offset:.15em}
.btbsl-site-main:not(.btbsl-site-main--full) a:hover{text-decoration:none}
button,input,select,textarea{font:inherit}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.screen-reader-text:focus{clip:auto!important;width:auto;height:auto;margin:8px;padding:10px 14px;z-index:100000;background:#fff;color:#111;border:1px solid #ddd}
.btbsl-site{min-height:100vh;display:flex;flex-direction:column}
.btbsl-container{width:min(var(--btbsl-container),calc(100% - (var(--btbsl-pad) * 2)));margin-inline:auto}
.btbsl-site-main{width:min(var(--btbsl-container),calc(100% - (var(--btbsl-pad) * 2)));margin:0 auto;padding:42px 0 64px;flex:1 0 auto;min-width:0}
.btbsl-site-main--full{width:100%;max-width:none;margin:0;padding:0}
.btbsl-entry{min-width:0}
.btbsl-entry-header{margin:0 0 28px}
.btbsl-entry-title{margin:0;color:var(--btbsl-text);font-size:clamp(30px,5vw,48px);line-height:1.1;letter-spacing:-.025em}
.btbsl-entry-content:after{content:"";display:table;clear:both}
.btbsl-entry-content>:first-child{margin-top:0}
.btbsl-entry-content>:last-child{margin-bottom:0}
.btbsl-meta{color:var(--btbsl-muted);font-size:.92rem;margin-top:8px}
.btbsl-pagination{margin-top:40px}
.btbsl-pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap}
.btbsl-pagination a,.btbsl-pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;padding:7px 12px;border:1px solid var(--btbsl-border);border-radius:10px;background:var(--btbsl-surface);text-decoration:none;color:var(--btbsl-text)}
.btbsl-pagination .current{background:var(--btbsl-primary);border-color:var(--btbsl-primary);color:#fff}

/* Fallback theme header. BTBS active sites do not render this markup. */
.btbsl-header{background:var(--btbsl-header-bg);color:var(--btbsl-header-text);border-bottom:1px solid var(--btbsl-border)}
.btbsl-header-inner{min-height:68px;display:flex;align-items:center;gap:24px;justify-content:space-between}
.btbsl-brand{display:flex;align-items:center;min-width:0;text-decoration:none;color:var(--btbsl-header-text);font-weight:800;font-size:20px;line-height:1.1}
.btbsl-brand .custom-logo{display:block;max-height:44px;width:auto}
.btbsl-nav{margin-left:auto}
.btbsl-nav ul{display:flex;align-items:center;gap:24px;list-style:none;margin:0;padding:0}
.btbsl-nav a{color:var(--btbsl-header-text);text-decoration:none;font-weight:650}
.btbsl-mobile-menu{display:none;margin-left:auto;position:relative}
.btbsl-mobile-menu summary{list-style:none;cursor:pointer;border:1px solid var(--btbsl-border);border-radius:10px;padding:9px 12px;font-weight:750}
.btbsl-mobile-menu summary::-webkit-details-marker{display:none}
.btbsl-mobile-menu nav{position:absolute;right:0;top:calc(100% + 8px);z-index:1000;min-width:230px;padding:8px;background:var(--btbsl-surface);border:1px solid var(--btbsl-border);border-radius:12px;box-shadow:0 12px 28px rgba(15,23,42,.12)}
.btbsl-mobile-menu ul{list-style:none;margin:0;padding:0}
.btbsl-mobile-menu a{display:block;padding:10px 12px;border-radius:8px;color:var(--btbsl-text);text-decoration:none}
.btbsl-mobile-menu a:hover{background:color-mix(in srgb,var(--btbsl-primary) 8%,transparent)}

/* Fallback theme footer. BTBS active sites use the plugin footer instead. */
.btbsl-footer{margin-top:auto;background:var(--btbsl-footer-bg);color:var(--btbsl-footer-text)}
.btbsl-footer-inner{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding-top:24px;padding-bottom:24px}
.btbsl-footer a{color:inherit}

.btbsl-list{display:grid;gap:20px}
.btbsl-card{padding:24px;border:1px solid var(--btbsl-border);border-radius:16px;background:var(--btbsl-surface)}
.btbsl-card h2{margin:0 0 8px;font-size:24px;line-height:1.25}
.btbsl-card h2 a{color:var(--btbsl-text);text-decoration:none}
.btbsl-404{text-align:center;padding:80px 0}
.btbsl-404 h1{font-size:clamp(48px,10vw,96px);margin:0;line-height:1}

/* Keep BTBS-managed pages wrapper-free and let the plugin own layout. */
body.btbs-home-page .btbsl-site,
body.single-btbs_tour .btbsl-site,
body.post-type-archive-btbs_tour .btbsl-site,
body.tax-btbs_tour_category .btbsl-site,
body.btbs-cart-flow-page .btbsl-site,
body.btbs-account-page .btbsl-site,
body.btbs-static-page-template .btbsl-site{min-height:0}

@media(max-width:800px){
  :root{--btbsl-pad:16px}
  .btbsl-site-main{padding-top:28px;padding-bottom:48px}
  .btbsl-nav{display:none}
  .btbsl-mobile-menu{display:block}
  .btbsl-header-inner{min-height:60px}
  .btbsl-footer-inner{display:block;text-align:center}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}


/* BTBS Home spacing integration
 * Keep the homepage cover tight to the BTBS header and remove the stacked
 * end-of-home whitespace before the BTBS global footer.
 */
body.btbs-home-page .btbsl-site-main--full,
body.btbs-home-page .btbsl-entry--btbs,
body.btbs-home-page .btbsl-entry-content{
  margin-top:0!important;
  padding-top:0!important;
}
body.btbs-home-page .btbs-dh-home,
body.btbs-home-page .btbs-mh-home,
body.btbs-home-page .btbs-mh-hero,
body.btbs-home-page .btbs-mh-cover-hero{
  margin-top:0!important;
}

@media(max-width:980px){
  /* Cover sits directly below the plugin mobile header. */
  body.btbs-home-page .btbs-global-header-wrap + .btbsl-site,
  body.btbs-home-page .btbsl-site-main--full,
  body.btbs-home-page .btbsl-entry--btbs,
  body.btbs-home-page .btbsl-entry-content,
  body.btbs-home-page .btbs-mh-home,
  body.btbs-home-page .btbs-mh-cover-hero{
    margin-top:0!important;
    padding-top:0!important;
  }

  /* The final Home section should flow naturally into the footer. */
  body.btbs-home-page .btbs-mh-inspiration{
    margin-bottom:0!important;
  }
  body.btbs-home-page .btbs-mh-home{
    padding-bottom:4px!important;
  }
  body.btbs-home-page .btbs-global-footer{
    margin-top:4px!important;
  }
}

@media(min-width:981px){
  body.btbs-home-page .btbs-dh-home{
    margin-top:0!important;
  }
  body.btbs-home-page .btbs-dh-inspiration{
    margin-bottom:0!important;
  }
  body.btbs-home-page .btbs-global-footer{
    margin-top:4px!important;
  }
}


/* BTBS transaction / account page spacing integration
 * BTBS already renders the cards/forms. The theme only normalizes the outer
 * whitespace so Cart, Login/Register, Account, Checkout and Payment sit
 * naturally below the BTBS header and above the footer.
 */
body.btbs-auth-page .btbsl-site,
body.btbs-account-page .btbsl-site,
body.btbs-cart-flow-page .btbsl-site{
  min-height:0;
}
body.btbs-auth-page .btbsl-site-main--full,
body.btbs-account-page .btbsl-site-main--full,
body.btbs-cart-flow-page .btbsl-site-main--full,
body.btbs-auth-page .btbsl-entry--btbs,
body.btbs-account-page .btbsl-entry--btbs,
body.btbs-cart-flow-page .btbsl-entry--btbs,
body.btbs-auth-page .btbsl-entry-content,
body.btbs-account-page .btbsl-entry-content,
body.btbs-cart-flow-page .btbsl-entry-content{
  margin-top:0!important;
  padding-top:0!important;
  margin-bottom:0!important;
  padding-bottom:0!important;
}

/* Desktop/tablet: reduce the old ~44px top gap while keeping centered forms. */
body.btbs-auth-page .btbs-auth-box,
body.btbs-account-page .btbs-account,
body.btbs-cart-page .btbs-cart,
body.btbs-checkout-page .btbs-checkout,
body.btbs-payment-page .btbs-checkout,
body.btbs-payment-page .btbs-custom-payment-page,
body.btbs-payment-page .btbs-auth-box{
  width:calc(100% - 40px)!important;
  margin-top:18px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  margin-bottom:22px!important;
}

@media(max-width:980px){
  /* Mobile: a compact, consistent gutter around every transaction screen. */
  body.btbs-auth-page .btbs-auth-box,
  body.btbs-account-page .btbs-account,
  body.btbs-cart-page .btbs-cart,
  body.btbs-checkout-page .btbs-checkout,
  body.btbs-payment-page .btbs-checkout,
  body.btbs-payment-page .btbs-custom-payment-page,
  body.btbs-payment-page .btbs-auth-box{
    width:calc(100% - 24px)!important;
    max-width:920px;
    margin-top:10px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    margin-bottom:16px!important;
    padding-left:14px!important;
    padding-right:14px!important;
    box-sizing:border-box!important;
  }

  /* Avoid an extra theme gap immediately under the BTBS mobile header. */
  body.btbs-auth-page .btbs-global-header-wrap + .btbsl-site,
  body.btbs-account-page .btbs-global-header-wrap + .btbsl-site,
  body.btbs-cart-flow-page .btbs-global-header-wrap + .btbsl-site{
    margin-top:0!important;
    padding-top:0!important;
  }
}

@media(max-width:380px){
  body.btbs-auth-page .btbs-auth-box,
  body.btbs-account-page .btbs-account,
  body.btbs-cart-page .btbs-cart,
  body.btbs-checkout-page .btbs-checkout,
  body.btbs-payment-page .btbs-checkout,
  body.btbs-payment-page .btbs-custom-payment-page,
  body.btbs-payment-page .btbs-auth-box{
    width:calc(100% - 20px)!important;
    margin-top:8px!important;
    margin-bottom:14px!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
}
