/* =============================================================================
   Exclusive FDB – landing page
   Layout/look ported from "Dafabet Mahjong Ways LP3".
   The registration form is the shared normal-reg (normal-reg-v3/index.php);
   its own stylesheet (rf-style.min.css) is loaded later in <body>, so every
   form rule below is prefixed with  .reg .rf-main-wrapper .registration-form
   (aliased in comments as "R") to win on specificity instead of !important.
   ============================================================================= */

@font-face{font-family:"Roboto-Regular";src:local("Roboto-Regular"),local("Roboto"),url("../fonts/Roboto/Roboto-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Roboto-Bold";src:local("Roboto Bold"),local("Roboto-Bold"),url("../fonts/Roboto/Roboto-Bold.ttf") format("truetype");font-weight:700;font-display:swap}

:root{
  --red:#a90000;--dred:#8f0000;--gold:#ffe600;--green:#4cf04a;--grey:#e8e8ea;
  --body-font:"Roboto-Regular",Roboto,Arial,sans-serif;
  --head-font:"Roboto-Bold","Arial Black",Arial,sans-serif;
  --thai:"Noto Sans Thai","Sarabun","Prompt",Tahoma,sans-serif;
  --chrome:171px; /* header + partner strip; refined by script.js */
}
body.th{--head-font:var(--thai)}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--body-font);font-size:14px;color:#333;background:var(--grey)}
img{max-width:100%;height:auto}
[hidden]{display:none!important}

/* ---------------------------------------------------------------- hero ---- */
/* Desktop composition follows the design team's mock-up: artwork, headline and
   T&C button share one centre line (--cx, set by script.js) left of the page
   centre; the larger form sits close to the right edge.                      */
.hero{position:relative;overflow:hidden;background:#2a1000;height:max(480px,calc(100vh - var(--chrome)));height:max(480px,calc(100dvh - var(--chrome)))}
.hero__art{position:absolute;top:0;bottom:0;right:0;left:calc(var(--ax,0px)*2);background:url(../img/hero-bg.jpg) center bottom/cover no-repeat}
/* desktop: art scaled exactly by --ka so the card lands on the art's form frame */
@media (min-width:1025px){.hero__art{background-size:calc(1920px*var(--ka,1)) calc(728px*var(--ka,1))}}
/* per-language artwork (body class = $tpl_lang) */
body.th .hero__art{background-image:url(../img/hero-bg-th.jpg)}
.hero__copy{position:absolute;left:0;top:0;bottom:0;width:calc(var(--cx,50vw)*2);padding-top:calc(14px*var(--k,1));text-align:center;pointer-events:none}
.hero__copy>*{pointer-events:auto}

.headline{display:inline-block;margin:0;font-family:var(--head-font);font-weight:800;line-height:1.1;color:#fff;
  text-shadow:-2px -2px 0 #3d1700,2px -2px 0 #3d1700,-2px 2px 0 #3d1700,2px 2px 0 #3d1700,0 5px 0 #3d1700,0 0 22px rgba(0,0,0,.65)}
.headline span{display:block;white-space:nowrap}
.headline em{font-style:normal;color:var(--green)}
.headline .yellow{color:var(--green)}
.headline__l1{font-size:calc(58px*var(--hk,1))}
.headline__l2{font-size:calc(64px*var(--hk,1));color:var(--green)}
.headline__l3{font-size:calc(58px*var(--hk,1));margin-top:4px}

.btn-terms{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(12px*var(--k,1));min-width:calc(295px*var(--k,1));height:calc(72px*var(--k,1));padding:0 calc(18px*var(--k,1));border:2px solid #7dff86;border-radius:calc(14px*var(--k,1));color:#fff;font:800 calc(30px*var(--k,1))/1 var(--head-font);text-shadow:0 2px 2px rgba(0,0,0,.55);background:linear-gradient(#22b533,#0a7a1a);box-shadow:0 0 14px rgba(0,200,40,.6),inset 0 2px 0 rgba(255,255,255,.35);cursor:pointer;white-space:nowrap}
.btn-terms:hover{filter:brightness(1.1)}

/* ------------------------------------------------------------ form card --- */
/* Sizes are for a 1920px-wide screen; script.js scales the whole card (--fs). */
.reg{position:absolute;z-index:2;top:var(--ft,70px);right:var(--fr,24px);transform:scale(var(--fs,1));transform-origin:top right;
  width:400px;padding:22px 22px 18px;background:rgba(240,240,240,.97);border:1px solid rgba(255,255,255,.85);border-radius:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.55),0 0 0 1px rgba(0,0,0,.08);font-size:13px;color:#333}

/* wrapper chain always fills the card (some normal-reg-v3 copies set widths/margins with !important) */
.reg .fast-reg-wrap,
.reg .rf-main-wrapper,
.reg .rf-main-wrapper .registration-form{display:block!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box!important}
.reg .rf-main-wrapper{background:none;font-family:var(--body-font);font-size:13px;color:#333}
/* rf-style forces Tahoma on body.th; the Thai page's form text is English, so keep the page font */
body.th .reg .rf-main-wrapper{font-family:var(--body-font)!important}
.reg .rf-main-wrapper .registration-form{padding-top:0;padding-bottom:0}

/* R rows: label column | field */
.reg .rf-main-wrapper .registration-form .regform-item{display:grid;grid-template-columns:112px minmax(0,1fr);column-gap:8px;align-items:start;padding:0;margin:0 0 9px}
.reg .rf-main-wrapper .registration-form .regform-item>*{display:block;width:auto;margin:0}
.reg .rf-main-wrapper .registration-form .regform-item>.item-label{display:flex;align-items:center;justify-content:flex-end;min-height:32px;padding:0;text-align:right;text-transform:none;font-size:13.5px;line-height:1.2;color:#2b2b2b}
.reg .rf-main-wrapper .registration-form .regform-item>.item-label .required{margin-left:3px}
.reg .rf-main-wrapper .registration-form .regform-item>.item-element-wrapper{position:relative;min-width:0}
.reg .rf-main-wrapper .registration-form span.required{color:#d00}
/* row with an empty label (password strength box) spans the whole card, as in the mock-up */
.reg .rf-main-wrapper .registration-form .regform-item>.item-label:empty{display:none}
.reg .rf-main-wrapper .registration-form .regform-item>.item-label:empty+.item-element-wrapper{grid-column:1/-1}

/* R inputs + selects */
.reg .rf-main-wrapper .registration-form .regform-item>.item-element-wrapper input,
.reg .rf-main-wrapper .registration-form .regform-item>.item-element-wrapper select{display:block;width:100%;height:32px;margin:0;border:1px solid #cdcdcd;border-radius:3px;background:#fff;padding:0 10px;font:14px var(--body-font);color:#222;outline:0;box-shadow:inset 0 1px 2px rgba(0,0,0,.05)}
.reg .rf-main-wrapper .registration-form .regform-item>.item-element-wrapper select{padding:0 6px}
.reg .rf-main-wrapper .registration-form .item-element-wrapper input:focus,
.reg .rf-main-wrapper .registration-form .item-element-wrapper select:focus{border-color:#1a73e8;box-shadow:0 0 0 1px #1a73e8}
.reg .rf-main-wrapper .registration-form .regform-item.has-error input,
.reg .rf-main-wrapper .registration-form .regform-item.has-error select{border-color:#d00;box-shadow:0 0 0 1px #d00}
/* placeholders duplicate the labels – hide them, like the design */
.reg .rf-main-wrapper .registration-form input::placeholder{color:transparent}
.reg .rf-main-wrapper .registration-form #regForm_mobile_number::placeholder{color:#8a8a8a;font-family:var(--body-font)}

/* room for the in-field icons */
.reg .rf-main-wrapper .registration-form #regForm_username,
.reg .rf-main-wrapper .registration-form #regForm_email,
.reg .rf-main-wrapper .registration-form #regForm_first_name,
.reg .rf-main-wrapper .registration-form #regForm_last_name{padding-right:30px}
.reg .rf-main-wrapper .registration-form #regForm_password{padding-right:60px}

/* R validation tick/cross + password eye (sprite icons) */
.reg .rf-main-wrapper .registration-form .validation-icon,
.reg .rf-main-wrapper .registration-form .password-visibility-icon{top:50%;margin-top:-11.5px;transform:scale(.8);z-index:1}
.reg .rf-main-wrapper .registration-form .validation-icon{right:4px}
.reg .rf-main-wrapper .registration-form .password-visibility-icon{right:2px}
.reg .rf-main-wrapper .registration-form .password-visibility-icon.icon-show{top:50%}
.reg .rf-main-wrapper .registration-form #regForm_password~.validation-icon{right:32px}
.reg .rf-main-wrapper .registration-form .regform-bday .validation-icon{display:none}

/* R inline error + tips */
.reg .rf-main-wrapper .registration-form span.item-error{grid-column:1/-1;display:block;margin:4px 0 0;font-size:11.5px;line-height:1.3;color:#d00}
.reg .rf-main-wrapper .registration-form span.item-error a{color:#d00}
.reg .rf-main-wrapper .registration-form .form-input-tip{grid-column:1/-1;margin-top:6px;padding:7px 10px;border-radius:3px;font-size:11.5px;line-height:1.35;box-shadow:0 2px 4px rgba(0,0,0,.25)}

/* R password strength box – full card width, green meter (design) */
.reg .rf-main-wrapper .registration-form .password-strength-requirements{padding:10px 14px;border:0;border-radius:4px;background:#fff;color:#2b2b2b;font-size:11px;line-height:1.45;box-shadow:inset 0 0 0 1px #dedede}
.reg .rf-main-wrapper .registration-form .password-strength-requirements .password-strength-bar-wrapper{height:6px;margin-bottom:6px;border:0;border-radius:3px;background:#dcdcdc;overflow:hidden}
.reg .rf-main-wrapper .registration-form .password-strength-requirements .password-strength-bar{width:0;height:100%;border-radius:3px;background-color:#1aa33a;transition:width .25s}
.reg .rf-main-wrapper .registration-form .password-strength-requirements .password-strength-msg{margin:0;font-size:11px}
.reg .rf-main-wrapper .registration-form .password-strength-requirements ul{margin:0;padding:0 0 0 6px;list-style:none}
.reg .rf-main-wrapper .registration-form .password-strength-requirements ul li{margin:0;font-size:11px;font-weight:400}
.reg .rf-main-wrapper .registration-form .password-strength-requirements ul li::before{content:"\2022";margin-right:6px}
.reg .rf-main-wrapper .registration-form .password-validation-list li#validation-success{color:#0a8a1f;font-weight:400}
.reg .rf-main-wrapper .registration-form .password-validation-list li#validation-failed{color:#c00;font-weight:400}
/* meter is always green; only its width shows progress (normal-reg turns it red/yellow) */
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-1 .password-strength-bar,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-2 .password-strength-bar,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-3 .password-strength-bar,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-4 .password-strength-bar,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-5 .password-strength-bar{background-color:#1aa33a}
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-1 .password-strength-msg span,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-2 .password-strength-msg span,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-3 .password-strength-msg span{color:#d00}
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-4 .password-strength-msg span,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-5 .password-strength-msg span{color:#0a8a1f}
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-4,
.reg .rf-main-wrapper .registration-form .password-strength-requirements#password-5{background:#fff}

/* R date of birth: dd | mm | yyyy */
.reg .rf-main-wrapper .registration-form .regform-bday .item-element-wrapper{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:6px}
.reg .rf-main-wrapper .registration-form .regform-bday .item-element-wrapper>select#regForm_birthdate_day,
.reg .rf-main-wrapper .registration-form .regform-bday .item-element-wrapper>select#regForm_birthdate_month,
.reg .rf-main-wrapper .registration-form .regform-bday .item-element-wrapper>select#regForm_birthdate_year{width:100%;padding:0 4px}

/* R mobile: big flag in the label column, then [+code] [number] */
.reg .rf-main-wrapper .registration-form label[for=regForm_mobile_number]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.reg .rf-main-wrapper .registration-form .regform-item>.country-area-code{grid-column:2}
.reg .rf-main-wrapper .registration-form .country-area-code span.trigger{position:absolute;top:0;left:0;z-index:2;width:58px;height:32px;padding:0 2px;border:1px solid #cdcdcd;border-radius:3px;background:#fff;font:14px/30px var(--body-font);color:#222;text-align:center;white-space:nowrap;overflow:visible;cursor:pointer}
.reg .rf-main-wrapper .registration-form .country-area-code span.trigger::before{position:absolute;top:0;left:-62px;margin:0;transform:scale(1.05);transform-origin:right center;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.reg .rf-main-wrapper .registration-form .country-area-code span.trigger::after{top:14px;left:auto;right:4px;border-top-width:5px;border-top-color:#777;border-left-width:4px;border-right-width:4px}
.reg .rf-main-wrapper .registration-form .country-area-code:not(.pre-filled) span.trigger{padding-right:11px}
.reg .rf-main-wrapper .registration-form .country-area-code.pre-filled span.trigger{cursor:default}
.reg .rf-main-wrapper .registration-form .regform-item>.country-area-code input#regForm_mobile_number{width:calc(100% - 64px);margin-left:64px;padding-left:10px!important} /* beats rf-style's 150px !important */
.reg .rf-main-wrapper .registration-form .country-area-code ul{top:34px;left:0;right:0;z-index:5;max-height:240px;border-radius:3px;box-shadow:0 6px 18px rgba(0,0,0,.25)}
.reg .rf-main-wrapper .registration-form .country-area-code ul.active{height:240px}
.reg .rf-main-wrapper .registration-form .country-area-code li span{display:flex;align-items:center;padding:3px 8px;font-size:13px;line-height:1.2;color:#333}
.reg .rf-main-wrapper .registration-form .country-area-code li span:hover{background:#f2f2f2}
.reg .rf-main-wrapper .registration-form .country-area-code li span::before{flex:none;margin:-6px -6px -6px -10px;transform:scale(.55)}

/* R submit area – button + terms always fill the card width */
.reg .rf-main-wrapper .registration-form hr{display:none}
.reg .rf-main-wrapper .action-container{display:block!important;float:none!important;clear:both!important;width:100%!important;min-width:100%!important;max-width:none!important;margin:14px 0 0!important;padding:0!important;grid-column:1/-1!important;justify-self:stretch!important;align-self:stretch!important;flex:1 1 100%!important;box-sizing:border-box!important;font-size:13px!important}
.reg .rf-main-wrapper .action-container>div,
.reg .rf-main-wrapper .action-container>.button-wrapper,
.reg .rf-main-wrapper .action-container>.terms-and-conds{display:block!important;float:none!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box!important}
.reg .rf-main-wrapper .action-container .rf-submit-button{align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;max-width:none!important;height:44px;margin:0!important;padding:0 10px;border:0;border-radius:4px;background:#b00000;color:#fff;font:700 18px/1 var(--head-font);letter-spacing:.3px;text-transform:uppercase;white-space:nowrap;box-shadow:0 3px 0 #6e0000,0 4px 10px rgba(0,0,0,.25);cursor:pointer;transition:background .2s;box-sizing:border-box!important}
.reg .rf-main-wrapper .action-container .rf-submit-button:hover{background:#cc0000}
.reg .rf-main-wrapper .action-container .rf-submit-button.disabled{opacity:.7}
.reg .rf-main-wrapper .registration-form .submit-loading{width:26px;height:26px}
.reg .rf-main-wrapper .action-container .terms-and-conds{margin-top:14px!important;font-size:12px;font-style:italic;line-height:1.4;text-align:center!important;text-transform:none;color:#555}
.reg .rf-main-wrapper .action-container .terms-and-conds a{color:#c00;font-weight:400;text-decoration:underline}
.reg .rf-main-wrapper .registration-form .rf-notification{margin:10px 0 0;font-size:12px;font-weight:400;line-height:1.35}
.reg .rf-main-wrapper .registration-form .rf-submit-icon{transform:scale(.8);margin-right:3px}
.reg .rf-main-wrapper :focus-visible{outline:2px solid #1a73e8;outline-offset:1px}

/* --------------------------------------------------------------- modal ---- */
.modal{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.65);display:flex;align-items:center;justify-content:center;padding:16px}
.modal__box{position:relative;max-width:560px;width:100%;max-height:85vh;overflow:auto;background:#fff;border-radius:10px;padding:24px;color:#333;font-size:14px;line-height:1.5}
.modal__box h2{margin:0 32px 12px 0;font:700 22px/1.25 var(--head-font)}
.modal__x{position:absolute;top:6px;right:12px;border:0;background:none;font-size:28px;line-height:1;color:#333;cursor:pointer}
.modal__body p{margin:0 0 10px}
.modal__body h3{margin:16px 0 6px;font:700 15px var(--head-font)}
.modal__body ol,.modal__body ul{margin:0 0 10px;padding-left:22px}
.modal__body li{margin:0 0 4px}
.modal__body .tnc-alpha{list-style:lower-alpha}
.modal__body .tnc-package{display:block;margin:6px 0 2px}
.modal__body a{color:#c00}

@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------------------------------------------- TH: T&C modal theme ---- */
/* Dark-green popup: yellow italic title, yellow X, inner scroll area.      */
body.th .modal{background:rgba(0,0,0,.8)}
body.th .modal__box{display:flex;flex-direction:column;max-width:560px;max-height:min(530px,85vh);overflow:hidden;padding:22px 12px 24px 12px;background:#033d0c;border:2px solid #1fae4b;border-radius:8px;box-shadow:0 0 18px rgba(31,174,75,.35);color:#fff;font-size:14px;line-height:1.45}
body.th .modal__box h2{flex:none;margin:6px 24px 14px;text-align:center;font:italic 800 20px/1.25 var(--head-font);text-transform:uppercase;color:#ffe600}
body.th .modal__x{top:6px;right:12px;font:800 20px/1 var(--body-font);color:#ffe600}
body.th .modal__x:hover{color:#fff}
body.th .modal__body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0 12px 0 0;scrollbar-width:thin;scrollbar-color:#1fae4b transparent}
body.th .modal__body::-webkit-scrollbar{width:5px}
body.th .modal__body::-webkit-scrollbar-track{background:transparent}
body.th .modal__body::-webkit-scrollbar-thumb{background:#1fae4b;border-radius:3px}
body.th .modal__body p{margin:0 0 14px}
body.th .modal__body .tnc-offer{margin:0 0 4px;font-weight:700;font-size:15px;color:#ffe600}
body.th .modal__body h3{margin:4px 0 8px;font:700 15px var(--head-font);text-transform:uppercase;color:#ffe600}
body.th .modal__body ol{margin:0 0 6px;padding-left:24px}
body.th .modal__body li{margin:0 0 8px}
body.th .modal__body .tnc-sublist{margin:6px 0 0;padding-left:20px}
body.th .modal__body .tnc-sublist li{margin:0 0 3px}
body.th .modal__body a{color:#ffe600;text-decoration:underline}
body.th .modal__body strong{color:#fff}
