/* Granular Fitness standalone add-on, isolated class prefix gf- */
#gf-root {font-family:'Prompt','Noto Sans Thai',system-ui,sans-serif;color:#251b18;}
#gf-root *{box-sizing:border-box}
#gf-root :is(button,input,select,textarea){font-family:inherit}
.gf-choice{padding:30px 0 22px;scroll-margin-top:105px}
.gf-kicker{display:block;color:#b84e11;font-size:12px;font-weight:800;letter-spacing:.11em}
.gf-choice-title h2,.gf-heading h2{font-size:clamp(27px,3vw,40px);margin:7px 0 4px;line-height:1.25}
.gf-choice-title p,.gf-heading p{color:#73584b;line-height:1.7;margin:3px 0 18px}
.gf-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.gf-service{padding:0;cursor:pointer;text-align:left;display:flex;align-items:stretch;gap:15px;border:2px solid #efddcf;border-radius:19px;background:#fff;overflow:hidden;transition:border-color .2s,box-shadow .2s}
.gf-service.gf-selected{border-color:#d9530f;box-shadow:0 6px 22px #d450121c}
.gf-service img{display:block;width:38%;min-width:90px;height:125px;object-fit:cover}
.gf-service-info{display:flex;flex:1;flex-direction:column;justify-content:center;gap:9px;padding:12px 12px 12px 0}
.gf-service-info strong{font-size:clamp(16px,2.0vw,23px)}.gf-service-info small{font-size:13px;color:#836957;line-height:1.6}
.gf-panel{padding:20px 0 72px;scroll-margin-top:100px}
.gf-heading{margin-bottom:23px}.gf-cols{display:grid;grid-template-columns:1fr 1fr;gap:23px;align-items:start}
.gf-box{background:#fff;border:1px solid #efd4c3;border-radius:21px;padding:25px;box-shadow:0 10px 27px #76371c11;min-width:0}
.gf-box h3{font-size:22px;margin:0 0 19px}
.gf-box label:not(.gf-plans label){display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:650;margin-top:15px}
.gf-box input:not([type=radio]):not([type=file]){height:47px;border-radius:10px;border:1px solid #dabca9;padding:8px 12px;font-size:15px;max-width:100%;background:#fff}
.gf-box input[type=file]{width:100%;padding:10px;border:1px solid #dbc4b6;border-radius:10px}
.gf-plans{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.gf-plans label{cursor:pointer}.gf-plans label input{position:absolute;opacity:0}
.gf-plans label span{display:flex;min-height:130px;flex-direction:column;align-items:flex-start;gap:6px;border:2px solid #ebd6c8;border-radius:14px;padding:15px;background:#fffaf6}
.gf-plans label input:checked+span{border-color:#e85d16;background:#fff0e3}
.gf-plans label input:focus-visible+span{outline:3px solid #f4ac71}
.gf-plans strong{font-size:19px}.gf-plans small{font-size:12px;color:#765b50;line-height:1.5}.gf-plans b{font-size:21px;color:#b8430d;margin-top:auto}
.gf-primary,.gf-secondary{border:0;border-radius:11px;padding:14px 17px;font-weight:800;cursor:pointer;font-family:inherit;font-size:15px}
.gf-primary{display:block;background:linear-gradient(100deg,#fa6815,#bf3c09);color:white;width:100%;margin-top:18px;min-height:52px}
.gf-primary:disabled{opacity:.55;cursor:wait}.gf-secondary{background:#fff3e8;color:#ae390b;border:1px solid #e3b498}
.gf-hint{font-size:12px;line-height:1.7;color:#795f52;margin:15px 0 8px}
.gf-members{min-height:350px}.gf-members .gf-secondary{margin-top:12px}
.gf-pass{color:#fff;background:#201915;border-radius:18px;padding:22px;margin-bottom:14px;box-shadow:0 8px 30px #29110c25}
.gf-pass.gf-inactive{background:#574d45}.gf-pass.gf-pending{background:#6a4031}
.gf-pass-label{font-size:10px;color:#ffb886;letter-spacing:.13em;font-weight:800}
.gf-pass-code{display:block;color:#e9c4ab;font-size:11px;margin:-5px 0 13px}.gf-pass h4{margin:4px 0 13px;font-size:28px;line-height:1.1;color:#fff}
.gf-pass-status{display:inline-block;background:#d7f7e5;color:#126a37;border-radius:999px;font-weight:800;padding:5px 12px;font-size:13px;margin-bottom:11px}
.gf-inactive .gf-pass-status,.gf-pending .gf-pass-status{background:#fff1db;color:#8f460d}
.gf-pass p{display:flex;flex-direction:column;margin:8px 0;gap:2px;line-height:1.45}.gf-pass small{color:#f1cabc;font-size:12px}.gf-pass strong{color:white;font-size:16px}
.gf-pass-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#ffffff15;border-radius:10px;padding:14px;margin-top:13px}
.gf-pass-dates span{display:flex;flex-direction:column;gap:3px}.gf-live{color:#ccefd2;display:block!important;font-size:12px}.gf-pass-note{font-size:12px;color:#ffdfce}
.gf-pay{margin-top:21px;max-width:750px}.gf-qr{display:block;width:min(300px,100%);height:auto;max-height:330px;object-fit:contain;margin:14px auto}
#gf-message{background:#e8f8eb;color:#186334;border-radius:10px;padding:14px 15px;font-weight:650;margin-top:16px}
#gf-message.gf-error{background:#ffebe8;color:#a72e20}
#gf-root [hidden],#gf-admin-panel [hidden]{display:none!important}
.gf-admin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:15px 0 21px}
.gf-admin-stats>div{border:1px solid #ecd7c8;border-radius:13px;background:#fff9f6;padding:15px;display:flex;flex-direction:column;gap:3px}
.gf-admin-stats strong{font-size:27px;color:#d2510a}.gf-admin-stats span{color:#77594a;font-size:12px}
.gf-admin-toolbar{display:flex;gap:15px;align-items:end;margin:15px 0;flex-wrap:wrap}.gf-admin-toolbar label{display:flex;flex-direction:column;gap:7px;font-size:13px}.gf-admin-toolbar input{min-height:42px;border:1px solid #e8c9b5;border-radius:8px;padding:8px 12px}
.gf-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center;max-width:370px}.gf-bankcheck{display:flex;gap:5px;align-items:center;font-size:12px;flex-basis:100%;margin:5px 0}
#gf-admin-alert{padding:9px 2px;font-size:13px;font-weight:650}
@media(max-width:800px){.gf-cols{grid-template-columns:1fr}.gf-choices{grid-template-columns:1fr}.gf-service img{height:95px;width:30%}.gf-box{padding:18px}.gf-plans{grid-template-columns:1fr 1fr}}
@media(max-width:440px){.gf-plans{grid-template-columns:1fr}.gf-pass-dates{grid-template-columns:1fr}.gf-admin-stats{grid-template-columns:1fr}}

/* The standalone fitness purchase is permanently visible below court booking. */
#gf-root{width:100%;min-width:0;max-width:100%;margin:0 auto}
#gf-panel.gf-panel{padding:24px 0 35px;scroll-margin-top:100px}
.gf-pass-link{display:inline-block;text-decoration:none;margin-top:8px;font-size:13px}
@media(max-width:640px){#gf-panel.gf-panel{padding:20px 0 32px}.gf-heading h2{font-size:29px}}

/* Standalone Fitness: compact start-date and consecutive day count */
.gf-date-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end}
.gf-box #gf-days{height:47px;width:100%;border-radius:10px;border:1px solid #dabca9;padding:8px 12px;background:#fff;font-size:15px}
.gf-box #gf-days:focus-visible{outline:2px solid #dc5317;outline-offset:2px}
.gf-preview{display:flex;gap:14px;align-items:center;justify-content:space-between;background:#fff4eb;border:1px solid #f0d3c2;border-radius:13px;padding:15px;margin:18px 0 5px}
.gf-preview>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.gf-preview span{font-size:13px;font-weight:700;color:#4c2815}
.gf-preview small{font-size:12px;color:#86563a}
.gf-preview strong{font-size:23px;color:#ba3e08;white-space:nowrap}
.gf-box #gf-days-field[hidden]{display:none!important}
@media(max-width:480px){.gf-date-grid{grid-template-columns:1fr}.gf-preview{padding:12px}.gf-preview strong{font-size:21px}}

/* Separate fitness page: day-end picker and full-width info banner */
.gb-fitness-page main.shell{max-width:1300px;margin-inline:auto}
.gb-fitness-page #gf-panel{scroll-margin-top:100px}
.gb-fitness-page .gb-fitness-info{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}
#gf-root .gf-date-grid input[type="date"]{width:100%;min-width:0}
#gf-root .gf-date-grid input:disabled{background:#fff5ea;color:#6b4c3c;opacity:1}
#gf-root .gf-date-grid label{min-width:0}
@media(max-width:640px){.gb-fitness-page .gb-fitness-info{align-items:flex-start;gap:10px}.gb-fitness-page .gb-fitness-info strong{flex-basis:100%}}

/* Fitness page uses the same centered shell width as the booking page. */
.gb-fitness-page main.shell {width:100%;max-width:1300px;min-width:0;margin-inline:auto}
#gf-root,#gf-panel,.gf-cols,.gf-box,.gf-date-grid {min-width:0;max-width:100%}
.gf-plans label {position:relative;min-width:0}
.gf-plans input[type="radio"] {
  position:absolute;
  width:1px!important;
  height:1px!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  clip-path:inset(50%);
  overflow:hidden;
}
@media(max-width:700px){
  .gb-fitness-page main.shell {width:100%;max-width:100%;padding-inline:15px}
}

/* iPhone Safari date widgets must never widen their cards beyond viewport. */
#gf-root,#gf-root .gf-cols,#gf-root .gf-box,#gf-root .gf-date-grid,#gf-root .gf-date-grid label{min-width:0;max-width:100%}
#gf-root :is(#gf-date,#gf-end){box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;font-size:16px;overflow:hidden;text-overflow:ellipsis;-webkit-appearance:none;appearance:none}
#gf-root .gf-preview{min-width:0;max-width:100%;flex-wrap:wrap}
#gf-root .gf-preview strong{flex:0 0 auto}
@media(max-width:600px){.gb-fitness-page main.shell{box-sizing:border-box;max-width:100%;width:100%;min-width:0;padding-left:14px;padding-right:14px}.gf-date-grid{grid-template-columns:minmax(0,1fr)}.gf-box{padding:16px}.gf-plans{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.gf-plans label span{min-height:130px;padding:11px}.gf-plans strong{font-size:18px}.gf-plans b{font-size:19px}}
@media(max-width:330px){.gf-plans{grid-template-columns:1fr}}

/* 013: Two full-width date buttons. A three-part day/month/year selector replaces Safari's tiny calendar hit area. */
#gf-root .gf-date-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
#gf-root .gf-date-field{min-width:0}
#gf-root .gf-date-label{display:block;font-size:14px;font-weight:700;margin-bottom:8px}
#gf-root .gf-date-button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;width:100%;box-sizing:border-box;padding:10px 13px;border-radius:12px;border:1px solid #dabca9;background:#fffaf6;color:#38251b;font-family:inherit;font-size:15px;font-weight:650;text-align:left;cursor:pointer}
#gf-root .gf-date-button:hover{border-color:#e86a24;background:#fff5ea}
#gf-root .gf-date-button:focus-visible{outline:3px solid #e85d16;outline-offset:2px}
#gf-root .gf-date-button>span:first-child{white-space:normal;min-width:0;overflow-wrap:anywhere}
#gf-root .gf-date-chevron{color:#c65012;font-size:21px;line-height:1;flex:none}
body.gf-picker-open{overflow:hidden}
#gf-root .gf-date-overlay:not([hidden]){position:fixed;inset:0;z-index:9999;background:rgba(21,13,8,.58);display:flex;justify-content:center;align-items:center;padding:16px;box-sizing:border-box}
#gf-root .gf-date-dialog{width:min(480px,100%);max-height:calc(100vh - 32px);overflow:auto;border-radius:20px;background:#fff;padding:22px;box-shadow:0 20px 80px #0004;box-sizing:border-box}
#gf-root .gf-date-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px}
#gf-root .gf-date-dialog h4{font-size:22px;line-height:1.3;margin:0}
#gf-root .gf-picker-close{width:38px;height:38px;min-width:38px;border-radius:10px;border:1px solid #e5cbbb;background:#fff7f0;font-size:26px;cursor:pointer;color:#642d15}
#gf-root .gf-picker-note{font-size:13px;line-height:1.6;color:#77594a;margin:13px 0 16px}
#gf-root .gf-picker-selects{display:grid;grid-template-columns:.7fr 1.5fr 1fr;gap:9px}
#gf-root .gf-picker-selects label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:700;margin:0;min-width:0}
#gf-root .gf-picker-selects select{display:block;width:100%;min-width:0;height:48px;border-radius:10px;padding:0 8px;background:#fff;border:1px solid #dcbba5;font-family:inherit;color:#2e211c;font-size:16px;cursor:pointer}
#gf-root .gf-picker-feedback{font-size:14px;color:#82420f;margin:15px 0 0;min-height:22px}
#gf-root .gf-picker-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
#gf-root .gf-picker-actions button{font-family:inherit;font-size:15px;font-weight:750;min-height:44px;padding:10px 17px;border-radius:11px;cursor:pointer}
#gf-root .gf-picker-cancel{border:1px solid #e0c6b5;background:#fff;color:#78452e}
#gf-root .gf-picker-ok{border:0;background:#e95612;color:#fff}
@media(max-width:620px){#gf-root .gf-date-grid{grid-template-columns:1fr;gap:12px}#gf-root .gf-date-dialog{padding:18px}#gf-root .gf-date-button{font-size:16px}}


/* 014 – Dropdown below the date field, with a vertically centered chevron. */
#gf-root .gf-date-grid { position:relative; z-index:2; overflow:visible; }
#gf-root .gf-date-field { position:relative; overflow:visible; }
#gf-root .gf-date-button { display:grid; grid-template-columns:minmax(0,1fr) 18px; align-items:center; padding-right:15px; }
#gf-root .gf-date-chevron { display:grid; place-items:center; width:18px; height:18px; margin:0; padding:0; align-self:center; justify-self:center; line-height:1; font-size:0; }
#gf-root .gf-date-chevron::after { content:""; display:block; width:7px; height:7px; border-right:2px solid #c65012; border-bottom:2px solid #c65012; transform:translateY(-2px) rotate(45deg); }
#gf-root .gf-date-button[aria-expanded="true"] .gf-date-chevron::after { transform:translateY(2px) rotate(225deg); }
#gf-root .gf-date-overlay:not([hidden]) { position:absolute; inset:auto; left:0; top:calc(100% + 7px); z-index:75; display:block; width:min(360px,calc(100vw - 36px)); max-width:none; padding:0; background:transparent; box-sizing:border-box; }
#gf-root .gf-date-overlay.gf-align-right:not([hidden]) { left:auto; right:0; }
#gf-root .gf-date-dialog { width:100%; max-height:min(420px, 68vh); padding:16px; overflow-y:auto; border:1px solid #eac9b4; border-radius:15px; background:#fff; box-shadow:0 12px 36px #4d2b2430; }
#gf-root .gf-date-dialog h4 { font-size:17px; }
#gf-root .gf-picker-close { width:30px; min-width:30px; height:30px; font-size:22px; }
#gf-root .gf-picker-note { margin:8px 0 12px; font-size:12px; }
#gf-root .gf-picker-selects { gap:6px; }
#gf-root .gf-picker-selects label { font-size:12px; margin:0; }
#gf-root .gf-picker-selects select { height:43px; font-size:14px; padding-inline:5px; }
#gf-root .gf-picker-feedback { margin-top:9px; min-height:18px; font-size:12px; }
#gf-root .gf-picker-actions { margin-top:8px; }
#gf-root .gf-picker-actions button { font-size:13px; min-height:39px; padding:8px 11px; }
@media(max-width:620px) { #gf-root .gf-date-overlay:not([hidden]) { width:100%; max-width:100%; } }

/* 016: required slip attachment state. */
.gf-required{color:#b42318;font-size:12px}
#gf-send:disabled{opacity:.5;cursor:not-allowed}

/* 017 — consistent ten-minute payment countdown below slip upload */
.gf-payment-deadline{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 15px;margin:12px 0;border:1px solid #eed0b8;background:#fff3e9;border-radius:12px;color:#843710;font-weight:650;flex-wrap:wrap}
.gf-payment-deadline strong{font-variant-numeric:tabular-nums;font-size:1.4rem}
