/*
  ============================================================
  POSABU KIOSK — SCREEN-01 — Welcome
  ============================================================

  এই CSS file-এর প্রধান কাজ:

  HTML-এর element-গুলোকে Figma specification অনুযায়ী
  exact position, size, typography এবং visual style দেওয়া।

  মূল ধারণা:

  HTML = Element কী
  CSS  = Element কোথায় এবং কেমন
  JS   = Element কীভাবে কাজ করবে


  Figma → CSS mapping:

  Figma X       → left
  Figma Y       → top
  Figma Width   → width
  Figma Height  → height
  Figma Radius  → border-radius
  Figma Font    → font-family
  Figma Size    → font-size
  Figma Weight  → font-weight
  Figma Color   → color
  ============================================================
*/


/*
  Google Fonts থেকে আমাদের ব্যবহৃত font load করছি।

  Inter:
  Language, Button এবং Footer-এর জন্য।

  Irish Grover:
  Welcome Title-এর জন্য।
*/
@import url(
  "https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Irish+Grover&display=swap"
);


/*
  ============================================================
  DESIGN TOKENS
  ============================================================

  একই value বারবার ব্যবহার হলে
  CSS variable ব্যবহার করা সহজ।

  JavaScript-ও পরে --brand-color পরিবর্তন করতে পারে।
  ============================================================
*/

:root {

  /* Figma Frame Width */
  --screen-width: 1080px;

  /* Figma Frame Height */
  --screen-height: 1920px;

  /* Default brand color */
  --brand-color: #771619;

  /* White */
  --white: #ffffff;

  /* Main dark text */
  --black: #1a1a1a;

  /* Footer text color */
  --footer-color: #d8cdbf;

  /* Language divider color */
  --divider-color: #d8cdbf;
}


/*
  ============================================================
  GLOBAL BOX MODEL
  ============================================================

  box-sizing: border-box অর্থ:

  width/height-এর মধ্যে
  padding এবং border-ও গণনা হবে।

  Exact Figma geometry-এর জন্য এটি গুরুত্বপূর্ণ।
*/
* {
  box-sizing: border-box;
}


/*
  Browser-এর default margin/padding সরিয়ে দিচ্ছি।

  Browser নিজের default spacing দিলে
  Figma-এর exact geometry নষ্ট হতে পারে।
*/
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}


/*
  Body-এর default background।

  Kiosk frame-এর বাইরের অংশে এটি দেখা যেতে পারে
  যদি viewport/frame ratio আলাদা হয়।
*/
body {
  background: #111;
  overflow: auto;
}


/*
  ============================================================
  KIOSK FRAME
  ============================================================

  Figma Frame:

  Width  = 1080px
  Height = 1920px

  এই element-ই আমাদের actual SCREEN-01 canvas।
*/
.kiosk-screen {

  /* Absolute positioning-এর reference container */
  position: relative;

  /* Figma Frame Width */
  width: 1080px;

  /* Figma Frame Height */
  height: 1920px;

  /* Browser viewport-এর center-এ frame রাখছি */
  margin: 0 auto;

  /* Frame-এর বাইরে থাকা content লুকানো */
  overflow: hidden;

  /* Background fallback */
  background: #000;
}


/*
  ============================================================
  BACKGROUND
  ============================================================

  Figma-এর background image এখানে বসানো হচ্ছে।
*/
.screen-background {

  /* Parent frame-এর reference অনুযায়ী position */
  position: absolute;

  /* Figma X = 0 */
  left: 0;

  /* Figma Y = 0 */
  top: 0;

  /* পুরো Frame-এর Width */
  width: 1080px;

  /* পুরো Frame-এর Height */
  height: 1920px;

  /*
    Background image asset।

    এটি HTML-এর img নয়;
    CSS background image।
  */
  background-image: url("../../assets/backgrounds/welcome-bg.png");

  /*
    Image-এর center অংশকে frame-এর center-এ রাখছি।
  */
  background-position: center;

  /*
    পুরো frame cover করার জন্য image scale হবে।
  */
  background-size: cover;

  /* Image repeat বন্ধ */
  background-repeat: no-repeat;

  /*
    Background সব visual element-এর নিচে থাকবে।
  */
  z-index: 0;
}


/*
  Background-এর উপর dark overlay।

  ::after হলো pseudo-element।

  এটি HTML-এ আলাদা element না বানিয়েও
  background-এর উপর একটি layer তৈরি করতে দেয়।
*/
.screen-background::after {

  /* Pseudo-element তৈরি করার জন্য */
  content: "";

  /* Background-এর পুরো area cover করবে */
  position: absolute;

  /* চার পাশ থেকে 0 অর্থ পুরো parent cover */
  inset: 0;

  /* Overlay-এর color */
  background: #000;

  /*
    এখানে Figma থেকে exact opacity বসাতে হবে।

    বর্তমানে 0 রাখা হয়েছে কারণ
    final exact value এখনো confirm করা হয়নি।
  */
  opacity: 0;

  /* Overlay যেন click block না করে */
  pointer-events: none;
}


/*
  ============================================================
  LOGO
  ============================================================

  Figma Geometry:

  X      = 419px
  Y      = 318px
  Width  = 300px
  Height = 300px
*/
.brand-logo {

  /* Figma position ব্যবহার করার জন্য */
  position: absolute;

  /* Figma X */
  left: 419px;

  /* Figma Y */
  top: 318px;

  /* Figma Width */
  width: 300px;

  /* Figma Height */
  height: 300px;

  /*
    Image content কীভাবে 300×300 box-এর মধ্যে বসবে।

    Cover হলে পুরো box পূর্ণ হবে,
    প্রয়োজনে image crop হবে।
  */
  object-fit: cover;

  /*
    Background-এর উপরে logo থাকবে।
  */
  z-index: 2;
}


/*
  ============================================================
  WELCOME TITLE
  ============================================================

  Figma Geometry:

  X      = 240px
  Y      = 683px
  Width  = 594px
  Height = 101px
*/
.welcome-title {

  /* Exact Figma position */
  position: absolute;

  /* Figma X */
  left: 240px;

  /* Figma Y */
  top: 683px;

  /* Figma Width */
  width: 594px;

  /* Figma Height */
  height: 101px;

  /*
    Browser-এর h1 default margin সরিয়ে দিচ্ছি।
  */
  margin: 0;

  /*
    Text-কে box-এর vertical center-এ রাখছি।
  */
  display: flex;

  /* Vertical alignment */
  align-items: center;

  /* Horizontal alignment */
  justify-content: center;

  /* Figma Font Family */
  font-family: "Irish Grover", cursive;

  /* Figma Font Size */
  font-size: 96px;

  /* Figma Font Weight */
  font-weight: 400;

  /*
    Line height 1 রাখলে text box-এর height
    বেশি unpredictable হয় না।
  */
  line-height: 1;

  /* Figma text color */
  color: var(--white);

  /* Text center */
  text-align: center;

  /* Background-এর উপরে থাকবে */
  z-index: 2;
}


/*
  ============================================================
  LANGUAGE SELECTOR
  ============================================================

  Figma Geometry:

  X      = 387px
  Y      = 810px
  Width  = 300px
  Height = 76px
*/
.language-selector {

  /* Exact position */
  position: absolute;

  /* Figma X */
  left: 387px;

  /* Figma Y */
  top: 810px;

  /* Figma Width */
  width: 300px;

  /* Figma Height */
  height: 76px;

  /* Children vertically center করার জন্য */
  display: flex;

  /* Vertical alignment */
  align-items: center;

  /* Selector background */
  background: var(--white);

  /* Figma border */
  border: 2px solid var(--brand-color);

  /* Pill shape */
  border-radius: 38px;

  /* Content border-এর বাইরে যেতে পারবে না */
  overflow: hidden;

  /* Logo/title-এর উপরে selector থাকবে */
  z-index: 3;
}


/*
  ============================================================
  LANGUAGE BUTTON
  ============================================================

  দুই language button-এর common style।
*/
.language-option {

  /*
    Parent selector-এর ভিতরে exact position দিতে
    absolute ব্যবহার করছি।
  */
  position: absolute;

  /* Parent-এর top থেকে শুরু */
  top: 0;

  /* Button-এর height */
  height: 76px;

  /* Browser default button padding সরানো */
  padding: 0;

  /* Default button border সরানো */
  border: 0;

  /* Parent-এর white background দেখা যাবে */
  background: transparent;

  /* Figma font */
  font-family: "Inter", Arial, sans-serif;

  /* Figma font size */
  font-size: 24px;

  /* Button clickable */
  cursor: pointer;

  /* Text center করার জন্য */
  display: flex;

  /* Vertical center */
  align-items: center;

  /* Horizontal center */
  justify-content: center;
}


/*
  Polish button-এর local X position।

  Parent:
  X = 387px

  Button:
  local X = 47px

  তাই screen coordinate:
  387 + 47 = 434px
*/
#language-pl {

  /* Parent-এর ভিতরের X */
  left: 47px;

  /* Text box Width */
  width: 70px;
}


/*
  English button-এর local X position।
*/
#language-en {

  /* Parent-এর ভিতরের X */
  left: 182px;

  /* Text box Width */
  width: 83px;
}


/*
  Active language-এর visual state।

  SCREEN-01 শুরু হলে Polish active।
*/
.language-option.active {

  /* Brand color */
  color: var(--brand-color);

  /* Figma active font weight */
  font-weight: 600;
}


/*
  Inactive language-এর visual state।
*/
.language-option:not(.active) {

  /* Dark text */
  color: var(--black);

  /* Figma inactive weight */
  font-weight: 400;
}


/*
  ============================================================
  LANGUAGE DIVIDER
  ============================================================

  Figma:

  Local X = 149px
  Local Y = 17px
  Width   = 3px
  Height  = 42px
*/
.language-divider {

  /* Parent selector-এর ভিতরে exact position */
  position: absolute;

  /* Figma local X */
  left: 149px;

  /* Figma local Y */
  top: 17px;

  /* Divider Width */
  width: 3px;

  /* Divider Height */
  height: 42px;

  /* Divider color */
  background: var(--divider-color);

  /* Decorative element; click block করবে না */
  pointer-events: none;
}


/*
  ============================================================
  ORDER ACTIONS
  ============================================================

  দুটি order button-এর common parent।

  Figma first button:
  X = 344px
  Y = 1010px
  W = 430px
  H = 104px

  দ্বিতীয় button:
  Y = 1146px

  তাই gap:

  1146 - (1010 + 104)
  = 32px
*/
.order-actions {

  /* Exact position */
  position: absolute;

  /* Figma X */
  left: 344px;

  /* Figma first button Y */
  top: 1010px;

  /* Container Width */
  width: 430px;

  /* Children vertical layout */
  display: flex;

  /* Button-গুলো column-এ */
  flex-direction: column;

  /* দুই button-এর মাঝের gap */
  gap: 32px;

  /* Selector-এর মতো উপরের layer */
  z-index: 3;
}


/*
  ============================================================
  ORDER BUTTON
  ============================================================
*/
.order-button {

  /* Figma Width */
  width: 430px;

  /* Figma Height */
  height: 104px;

  /* Default button padding remove */
  padding: 0;

  /* Default border remove */
  border: 0;

  /* Figma corner radius */
  border-radius: 24px;

  /* Backend theme color ব্যবহার করছে */
  background: var(--brand-color);

  /* Button text color */
  color: var(--white);

  /* Figma font */
  font-family: "Inter", Arial, sans-serif;

  /* Figma font size */
  font-size: 30px;

  /* Figma font weight */
  font-weight: 600;

  /* Text line box */
  line-height: 1;

  /* Text center */
  text-align: center;

  /* Cursor interaction */
  cursor: pointer;

  /* Button content center */
  display: flex;

  /* Vertical center */
  align-items: center;

  /* Horizontal center */
  justify-content: center;
}


/*
  ============================================================
  FOOTER
  ============================================================

  Figma Geometry:

  X      = 410px
  Y      = 1810px
  Width  = 261px
  Height = 70px

  Footer text backend-এর app_name থেকে আসবে।
*/
.footer {

  /* Exact Figma position */
  position: absolute;

  /* Figma X */
  left: 410px;

  /* Figma Y */
  top: 1810px;

  /* Figma Width */
  width: 261px;

  /* Figma Height */
  height: 70px;

  /* Content center করার জন্য */
  display: flex;

  /* Vertical center */
  align-items: center;

  /* Horizontal center */
  justify-content: center;

  /* Figma font */
  font-family: "Inter", Arial, sans-serif;

  /* Figma font size */
  font-size: 52px;

  /* Figma font weight */
  font-weight: 600;

  /* Footer color */
  color: var(--footer-color);

  /* Text center */
  text-align: center;

  /* Background-এর উপরে */
  z-index: 2;
}


/*
  ============================================================
  DEBUG GEOMETRY
  ============================================================

  JavaScript "G" চাপলে
  .debug class যোগ/বাদ করবে।

  এটি final UI-এর অংশ নয়।

  Geometry পরীক্ষা করার সাহায্যকারী guide।
*/
.kiosk-screen.debug::before {

  /* Pseudo-element তৈরি */
  content: "";

  /* পুরো screen cover */
  position: absolute;

  /* চার দিক 0 */
  inset: 0;

  /* Debug line click block করবে না */
  pointer-events: none;

  /* সব element-এর উপরে guide */
  z-index: 999;

  /*
    প্রথম gradient:

    Screen-এর vertical center:
    1080 / 2 = 540px

    তাই 539–541px-এর মধ্যে vertical line।
  */
  background:
    linear-gradient(
      to right,
      transparent 539px,
      rgba(255, 0, 0, 0.35) 539px,
      rgba(255, 0, 0, 0.35) 541px,
      transparent 541px
    ),

    /*
      দ্বিতীয় gradient:

      Screen-এর horizontal center:
      1920 / 2 = 960px

      তাই 959–961px-এর মধ্যে horizontal line।
    */
    linear-gradient(
      to bottom,
      transparent 959px,
      rgba(255, 0, 0, 0.35) 959px,
      rgba(255, 0, 0, 0.35) 961px,
      transparent 961px
    );
}


/*
  ============================================================
  CSS শেখার মূল ধারণা
  ============================================================

  Figma:

  X = 419
  Y = 318
  W = 300
  H = 300

  CSS:

  left   = 419px
  top    = 318px
  width  = 300px
  height = 300px

  অর্থাৎ exact prototype তৈরি করার মূল formula:

  Figma Geometry
       ↓
  CSS Geometry

  Parent-এর ভিতরের element হলে:

  Screen X
  =
  Parent X + Local X

  একইভাবে:

  Screen Y
  =
  Parent Y + Local Y

  এই ধারণাটি SCREEN-02, SCREEN-03
  এবং পরবর্তী সব screen-এ একই থাকবে।
  ============================================================
*/