/* ========================
   Reset Base and styles
======================== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: black;
}


html, body {
    height: 100%;
    font-size: 1rem;
    touch-action: manipulation;
    margin: 0;
    padding: 0;
    overscroll-behavior-y: contain; /* Android Chrome */
    color-scheme: light only;
    filter: none !important;
    forced-color-adjust: none !important;
}


body {
    font-family: 'Nunito', sans-serif;
    background-color: #f9f9f9;
    color: #000;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}


fieldset {
    border: 2px solid #45a049;
    padding: 0.625rem;
    margin-bottom: 0.4375rem;
    border-radius: 8px;
    background: rgba(235, 247, 236, 0.8);
}

/* inputs, select, option style */
input[type="text"],
input[type="number"],
input[type="date"],
select,
option {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 0.7rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1rem;
    line-height: 1.4;
    padding: 0.3rem 0.625rem;
    background-color: white;
}


/* For disabled input:anytype, still make it look like not disabled */
input[disabled],
select[disabled],
textarea[disabled] {
    background-color: white; 
    color: inherit; /* use the same text color as normal */
    opacity: 1; /* remove grayed-out look */
    cursor: text; /* keeps normal cursor instead of 'not-allowed' */
}

option:hover {
    background-color: #45a049;
}

/* button style */
button {
    border: none;
    background-color: #4CAF50;
    color: white;
    border-radius: 0.25rem;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.3;
}

button:disabled {
  background-color: #ccc; /* light gray */
  cursor: not-allowed;
}

/* Typography */
h2 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 0.625rem;
}

h3 {
    font-size: 1.2rem;
    line-height: 1.4;
}

p {
  overflow-wrap: anywhere;
  word-break: normal;
}

legend {
    font-size: 1rem;
    line-height: 1.4;
    padding: 0 0.25rem;
    font-weight: bold;
    text-align: center;
}


label {
    display: inline-block;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    padding: 0.3rem 0.625rem;
}


.modal-background{
  background: rgba(0, 0, 0, 0.4);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  z-index: 1;
}


/* Layout: Container & Pages */
.form-container {
    width: 100%;
    max-width: 600px;
    min-width: 260px;
    color-scheme: light only;

    /* Fill full mobile screen height */
    height: 100dvh;
    overflow: hidden;

    background: #ebf7ec;
    padding: 0 0.8rem 0.8rem 0.8rem;
    
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.7rem;
    flex: 1; /* Optional: grow to fill parent if needed */
    z-index: 1;
    position: relative;
    
}


/* For background image w/ Opacity */
.form-container::before{
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: url('./asset/bg-img-2.jpg') center center / cover no-repeat;
  opacity: 0.4; /* ← background image opacity */
  z-index: -1;
  pointer-events: none; /* prevents blocking clicks */
}


/* Discount Reminder Modal Styling */
.discount-reminder-container{
  border-radius: 8px;
  width: 90%;
  max-width: 412px;
  margin: 3em auto auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.discount-reminder-content{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.discount-reminder-content img{
  width: 100%;
  border-radius: 0.8em;
  border: 2px solid whitesmoke;
}

.discount-reminder-buttons{
  display: flex;
  justify-content: space-between;
}

.discount-reminder-buttons button{
  margin: 0;
  width: 100%;
  max-width: 5em;
  border-radius: 2em;
}

.discount-reminder-cancel-button{
  background-color:  #FA8072;
}


/*Start Page Style*/
.start-page{
  background-image: url('./asset/start-page-bg-img-2.jpg');
  background-size: cover; /* Or "contain", depending on the look */
  background-repeat: no-repeat;
  background-position: center;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

/* Start page start button*/
#start-page-start-btn{
  background: none; /*Remove background*/
}

/*Start button img/icon inserted in the start button*/
#start-button-img{
  width: 8em;
  animation: pulse 1.5s ease-in-out infinite;
  cursor: pointer;
  border: 2px solid white;
  background: white;
  border-radius: 2em;
}


/*kidzooona header logo container, always visible*/
.header-logo-container {
  position: relative;
  display: flex;
  justify-content: center;
}

/* kidzooona image logo */
.kz-header-logo{
  width: 90px;
}

/* UAT text */
.uat-note{
  position: absolute;
  right: 1%;
  top: 50%;
  transform: translateY(-50%);
}

/* ========================
   Reminder Page & Terms & Conditions Page
======================== */

/* Styles for reminder Page & Terms and Conditions Page */
.reminder-page,
.terms-and-conditions-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: justify;
  gap: 1.5em;
  padding-inline: 1.2em;
  font-size: 0.8rem;
  line-height: 1.2;
  min-height: 0;
}

/* Custom numbered list fix for Reminder page & Terms and Conditions page & view details children's list*/
.terms-and-conditions-page ol,
.reminder-page ol,
.details-children-list ol{
  list-style: none;
  counter-reset: list-counter;
  margin: 0;
}

.terms-and-conditions-page ol li,
.reminder-page ol li{
  counter-increment: list-counter;
  position: relative;
  text-align: justify;
  padding-left: 1.8em;
  margin-bottom: 1em;
}

.reminder-page ol li{
  font-size: 0.9rem;
}

.terms-and-conditions-page ol li::before,
.reminder-page ol li::before,
.details-children-list ol li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: 0;
}

.terms-box-shadow{
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}


/* Custom Button style for Reminder page, playground-rules page, generate qr button and fillup another button */
#reminder-proceed-btn, #playground-rules-next-btn{
  border-radius: 2em;
  width: 17em;
  height: 3em;
  margin-inline: auto;
  box-shadow: 0 2px 1px 2px rgba(0, 128, 0, 0.9);
}

/* KZ Mobile App Link URL Styles */
.kz-mobile-link{
  text-align: center;
  padding-inline: 1.7em;
  display: flex;
  justify-content: space-evenly;
  gap: 1em;
}

.kz-mobile-link a{
  text-decoration: none;
  font-weight: bold;
}

/* Appstore & Playstore Logo */
.kz-mobile-logo-url{
  width: 100%;
  max-width: 200px;
}

/* Other buttons disabled shadow box */
#reminder-proceed-btn:disabled, 
#playground-rules-next-btn:disabled, 
#generate-qr-btn button:disabled, 
.next-prev-btn-container button:disabled{
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.terms-condition-next-container{
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.checkbox-container {
  display: flex;
  align-items: start;
  gap: 0.5em;
  background: rgba(255,255,255,0.6);
  background-repeat: no-repeat;        /* do not repeat */
  background-position: center;         /* position in container */
  background-size: cover;              /* cover entire container */
  padding: 6px;
  position: relative;
  top: -8px;
  z-index: 10; 
}

/* Terms & Condition checkbox container */
.checkbox-container label{
  display: inline-block; /*keep checkbox and label inline*/
  font-size: 0.73rem;
  font-weight: 100;
  line-height: 1;
  transform: translateY(-5.5px);
}

.proceed-button-container, .playground-rules-next-container{
    display: grid;
    width: 100%;
    max-width: 100%;
}


/* For fill-up-page container, after agreeing to terms & conditions */
.fill-up-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5em;
    min-height: 0; /*  Allows scrollable children to shrink */
}

.form-container .page-container {
    flex: 1; /*  Take remaining space in form-container */
    display: flex;
    flex-direction: column;
    min-height: 0; /*  Needed for scroll inside child */
}


.pages {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    gap: 0.8rem;
    flex: 1;
}

.pages.active {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    gap: 0.8rem;
}

.page-headers-container{
    padding: 0 0.5em;
}

.page-headers-container h2{
    text-align: center;
}

.page-contents{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1em;
    min-height: 0;
    padding-inline: 0.5em;
}




/* This is for the scroll bar styling */
/* This makes sure that the content will still scroll up and down */
.scrollable {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Optional: style the scrollbar (WebKit only) */
.scrollable::-webkit-scrollbar {
  width: 0.2em; /* scrollbar thickness */
}

.scrollable::-webkit-scrollbar-thumb {
  background-color: #888; /* scrollbar color */
  border-radius: 5px;
}

.scrollable::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

/* This is for inputer number Increment & Decrement styling */
/* Number Spinner Container*/
.number-spinner {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-bottom: -1.1em; */

}

.number-spinner input {
    border-radius: 0.7rem;
}

.number-spinner button {
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0.2em;
    width: 1.375rem;
    height: 1.375rem;
    font-size: 1.2rem;
    line-height: 1.2;
}

/* Container for increment & decrement button */
.increment-decrement-container {
    position: absolute;
    right: 1%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make decrement button's color red */
.decrement-button {
    background-color: #fc5151;
}

/* Style for required label */
.required-sign{
  font-weight: bold;
  color: #FF6666;;
  font-size: 1.1rem;
  vertical-align: middle;
}


/* ========================
   Navigation Buttons
======================== */
/* Container for Next & Back button */
.next-prev-btn-container {
    display: flex;
    justify-content: space-around;
    gap: 0.625rem;
    width: 100%;
    max-width: 100%;
}

.next-prev-btn-container button{
  border-radius: 2em;
  width: 15em;
  height: 3em;
  box-shadow: 0 2px 1px 2px rgba(0, 128, 0, 0.9);
}



/* ========================
   Customer Information Page
======================== */
/* Contact number, Country code styling */
.input-contact-container{
  display: flex;
}

#country-code{
  width: fit-content;
  font-size: 0.8em;
}

/* This is contact number error message */
.error-message{
    color: red;
    padding: 0 0.625rem;
}

/* This is for Extra adult text */
.input-under-label{
  font-size: 0.9rem;
  padding: 0.3rem 0.625rem;
  font-weight: bold;
  display: inline-flex;
}

/* Extra Adult Note Styling */
.extra-adult-note-container{
  display: flex;
  font-size: 0.8rem;
  font-weight: bold;
  gap: 0.5em;
  padding: 0.3rem 0.625rem;
}

.extra-adult-note-label {
  flex-shrink: 0;
}

/* This is for complete address container - background styling */
/* REMOVED THE COMMENT OUT TO ENABLE ADDRESS FIELD */
/*.complete-address-container{
  background: rgba(235, 247, 236, 0.8);
  padding: 0.5em;
  border-radius: 1em;
  box-shadow: 0 1px 0 2px rgba(0, 0, 0, 0.3);
}*/

/* This is for address promo description */
/* REMOVED THE COMMENT OUT TO ENABLE ADDRESS FIELD */
/*.address-promo-description{
    padding: 0.3rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 1em;
    text-align: justify;
    line-height: 1.2;
}
.address-promo-description p {
    font-size: 0.8rem;
}*/


/* ========================
   Customer Information Page / Add Child Page
======================== */

/* Add child button style */
.add-child-button-container{
  display: grid;
  justify-content: flex-end;
  padding-inline: 0.7em;
}

#add-child-button{
  width: fit-content;
}


/* ========================
  Add Child Page > Add child Modal
======================== */
/* Pop-up modal background */
#add-child-modal > div{
    background: #ebf7ec;
    border-radius: 8px;
    width: 90%;
    max-width: 412px;
    margin: 1.875rem auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

/* For gender fieldset styling */
.gender-fieldset{
  border: none;
}
.gender-fieldset legend{
  text-align: start;
}

/* For gender selection layout positions */
.gender-selection-container {
    display: flex;
    justify-content: space-around;
    font-size: 0.875rem;
    line-height: 1.4;
    gap: 0.7rem;
}

/* For each gender container's style */
.gender-selection-container div {
    padding: 0;
    margin: 0.5rem 0 1rem;
    max-width: 15em;
    display: flex;
    justify-content: center;
    flex: 1;
}

/* For Gender Label's tyle */
.gender-selection-container label {
    display: inline-block;
    width: 100%;
    max-width: 10rem;
    padding: 0.4rem;
    text-align: center;
    border: 2px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    font-weight: bold;
    border-radius: 1.25rem;
}


/* Change background color of Male Gender when selected */
.gender-selection-container input[type="radio"][value="Male"]:checked + label {
    color: white;
    background-color: #2196f3;
    border: 2px solid #ccc;
}

/* Change background color of Female Gender when selected */
.gender-selection-container input[type="radio"][value="Female"]:checked + label {
    color: white;
    background-color: #e91e63;
    border: 2px solid #ccc;
}

/* hide the radio button of both male and female gender */
.gender-selection-container input[type="radio"] {
    display: none;
}

/* For child age */
#modal-child-age {
    font-size: 1rem;
    padding: 0.5rem;
    width: 100%;
    border-radius: 0.25rem;
    border: 1px solid #ccc;
    background-color: white;
}

/* Add child modal buttons position */
.add-child-modal-btn {
    display: flex;
    justify-content: space-between;
}

/* This is for the add child cancel button style */
#cancel-child-btn {
  border: 2px solid #e0e0e0;      
  background-color: #f9f9fb; 
  color: #333;                 
}

/* add child modal button margin 0 */
.add-child-modal-btn button {
    margin: 0;
    width: 100%;
    max-width: 5em;
    border-radius: 2em;
}

/* style of added child button edit & delete */
.edit-child,
.delete-child {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.add-child-error-container{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Add child noted style */
#add-child-helper{
  font-weight: bold;
  color: #fff;
  text-align: center;
}

/* Added Children List Styling */
/* Container for Children Lists */
.children-list {
    display: grid;
    gap: 0.4rem;
}

/* Style for each added child */
.child-entry {
    padding: 0.7em;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    overflow-wrap: break-word;
    background: rgba(235, 247, 236, 0.8);
}

.child-entry > div {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.625rem;
}

.child-entry > div > div:first-child{
    /* flex: 1 1 auto; grow as needed */
    min-width: 0;
    display: block;
}

.child-entry > div > div:last-child{
    display: flex;
    flex-wrap: wrap; /* only this container wraps */
    gap: 0.3125rem;
    justify-content: flex-end;
    flex-shrink: 1;
    max-width: 100%; /* optional: constrain width at small sizes */
}

.child-entry .delete-child,
.child-entry .edit-child {
    min-width: 3rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    text-align: center;
}

.child-entry .delete-child {
    background-color: #fc5151;
    border-color: #fc5151;
}

.child-entry .edit-child {
    background-color: #2196f3;
    border-color: #2196f3;
}



/* ========================
   Socks Selection Page
======================== */
/* For Socks Option */
#socks-options{
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}

/* For Socks Place Holder, if out of stock */
.out-of-stock-note::placeholder{
  color: red;
}




/* ========================
  Summary Page
======================== */
.summary-page {
    padding-inline: 1.25rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.summary-page h1 {
    text-align: center;
}

.summary-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.95rem;
    border: none;
}

.summary-table th,
.summary-table td {
    border-block: 1px solid #45a049;
    padding: 0.6em;
}

.summary-table th {
    font-weight: bold;
    border-bottom: 2px solid #45a049;
}

/* remove border on first/last row and column */
.summary-table tr:first-child th,
.summary-table tr:first-child td {
    border-top: none;
}

.summary-table tr:last-child td {
    border-bottom: none;
    border-left: none;
}

.summary-table th:first-child,
.summary-table td:first-child {
    border-left: none;
    text-align: start;
}

.summary-table th:last-child,
.summary-table td:last-child,
.summary-table tfoot td {
    border-right: none;
}

tfoot{
   border-top: 2px solid #45a049;
}

.price-align-end{
  text-align: end;
}

.branch-information{
  text-align: center;
  background: rgba(235, 247, 236, 0.8);
}

/* Custom button style for Generate QR Code button */
#generate-qr-btn{
  background-color: #2196f3;
  box-shadow: 0 2px 1px 2px rgba(17, 82, 133, 0.8); /* darker blue */
}


/* ========================
   QR Code Page
======================== */
/* QR Code page style */
#qr-code{
    flex-direction: column;
    width: 100%;
    text-align: center;
    flex: 1;
}

/* QR Code background style */
.qr-box{
    background-image: url(./asset/qr-code-background-white.png) !important; 
    /* background-size: cover; */
    background-position: center;
    padding: 0.9em;
    display: inline-block;
    width: fit-content;
    margin: 0 auto;
}

/* QR Code itself */
#qr-code img,
#qr-code canvas {
    display: block;
    max-width: 100%;
    height: auto;
    filter: none !important;
}

/* Reference Date Container */
.ref-date-container{
  display: flex;
  justify-content: center;
  gap: 1em;
  font-size: 0.6rem;
}

/* QR Code Button Container  and Button Style */
/* QR Code button container */
.qr-button-container{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    top: 96%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
    background: #FAFAFA;
}

/* QR Code buttons */
.qr-button-container button{
  background: none;
  color: #4CAF50;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
}

/* QR Code button icon */
#edit-icon, #view-icon, #new-form-icon{
  width: 1.8em;
}

/* View Details Modal */
.details-modal-container{
  width: 90%;
  margin: 2em auto auto;
}

/* Pop-up modal background */
.details-container {
    background: #ebf7ec;
    border-radius: 8px;
    width: 100%;
    height: 80vh;
    overflow-y: scroll;
    padding: 1em;
}

.summary-fieldset{
  display: grid;
  gap: 0.5em;
}

.close-modal-container{
  display: flex;
  justify-content: end;
}

.close-modal{
  background: none;
  padding: 0;
}

.close-icon{
  width: 2.5em;
}

.view-details-branch-information{
  text-align: center;
}

.details-children-list ol li {
  counter-increment: list-counter;
  position: relative;
  text-align: justify;
  padding-left: 1.8em;
}



/* ========================
   Spinner Loading Style
======================== */
/* Content inside the loader modal */
.modal-content {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  font-family: sans-serif;
  margin: auto auto;
}

/* Loading spinner */
.spinner {
  margin: 0 auto 10px;
  width: 30px;
  height: 30px;
  border: 4px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}



/* ========================
   Responsive: 480px to 768px
======================== */
@media (min-width: 480px) {
  html {
    font-size: 1.0625rem; /* Slight bump to 17px */
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .form-container {
    padding: 0 1rem 1rem 1rem;
    gap: 1rem;
  }

  .edit-child,
  .delete-child {
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
  }

  .number-spinner button {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.3rem;
  }
  
  /* .button-container {
    top: 0.8rem;
  } */
}

@media (min-width: 600px) {
  .form-container {
    padding: 0 1.2rem 1.2rem 1.2rem;
  }

  .child-entry > div > div:last-child {
    flex-wrap: nowrap; /* Display edit/delete inline */
    max-width: 50%;
  }

  .edit-child,
  .delete-child {
    min-width: 3.5rem;
  }

}


/* For Start button animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    /*filter: drop-shadow(0 0 0px rgba(0, 255, 0, 0.5));*/
  }
  50% {
    transform: scale(1.05);
    /*filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.5));*/
  }
  100% {
    transform: scale(1);
    /*filter: drop-shadow(0 0 0px rgba(0, 255, 0, 0.5));*/
  }
}











