/* for index.html - (Landing Page) */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'NotoSansKhmer', 'Inter';
  background: #e6e6e6;
  color: #222;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.wifi-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  overflow: hidden;
}

/* Top area */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  background: #fff;
}

.brand img {
  height: 34px;
  width: auto;
  display: block;
}

.lang-btn {
  border: 1px solid #d8d8d8;
  background: #fff;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 13px;
  color: #444;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.flag {
  font-size: 14px;
}

/* Hero banner */
.hero-banner {
  height: 138px;
  position: relative;
  overflow: hidden;
  background-image: url("../img/banner.jpg"); /* your image path */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-banner::before,
.hero-banner::after {
  content: "";
  position: absolute;
  /* border: 12px solid rgba(255, 255, 255, 0.55); */
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(45deg);
}

.hero-banner::before {
  width: 120px;
  height: 120px;
  right: 85px;
  top: 6px;
}

.hero-banner::after {
  width: 80px;
  height: 80px;
  right: 32px;
  top: 26px;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 18px 18px;
  color: #fff;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.hero-title .big {
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.hero-title .small {
  background: #f3a319;
  border: 3px solid #fff;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  padding: 6px 14px;
  border-radius: 50px;
  line-height: 1;
}

.hero-content p {
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Main content */
.content {
  padding: 24px 16px 28px;
  background: #fff;
}

.content h1 {
  text-align: center;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1f1f1f;
}

.subtitle {
  text-align: center;
  font-size: 14px;
  color: #606060;
  margin-bottom: 24px;
}

.wifi-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
  padding-top: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: #8e9194;
  margin-bottom: 6px;
}

/* .input-wrap {
  position: relative;
  border-bottom: 1px solid #171718;
  padding-bottom: 8px;
} */

.input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  color: #171718;
  background: transparent;
  padding-right: 34px;
  font-weight: 400;
  line-height: 24px;
}

.clear-btn {
  position: absolute;
  right: 4px;
  top: 10px;
  width: 20px;
  height: 20px;
  border: none;
  background: #bcbcbc;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 20px;
  cursor: pointer;
  position: relative;
}

.checkbox-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkmark {
  width: 17px;
  height: 17px;
  border-radius: 3px;
  margin-top: 2px;
  position: relative;
  flex-shrink: 0;
  border: 1px solid #9c9ea1;
}

.checkbox-row input:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  color: #fff;
  background-color: #7b7b7b;
  font-size: 12px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.checkbox-text {
  font-size: 14px;
  line-height: 1.6;
  color: #606060;
}

.checkbox-text a {
  color: #1b84d6;
  text-decoration: underline;
}

/* Button */
.connect-btn {
  display: block;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 50px;
  background: #ff8200;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease;
}

.connect-btn:hover {
  background: #f07700;
}
/* Top area */
.checkbox-row {
  display: flex;
  align-items: start;
  background: #fff;
  font-size: 14px;
}
.checkbox-row a {
  color: #0d90ce;
  text-decoration: none;
}
.connect-btn-div {
  background: #fff;
  position: inherit;
  bottom: 0;
}

/* checkbox text block */
.checkbox-copy {
  flex: 1;
}

/* bottom sheet modal */
body.modal-open {
  overflow: hidden;
}

.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 999;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bottom-sheet {
  width: 100%;
  max-width: 380px;
  max-height: 90%;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  position: relative;
  overflow-y: auto;
}

.bottom-sheet-overlay.active .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 56px;
  height: 5px;
  border-radius: 999px;
  background: #d4d4d4;
  margin: 10px auto 0;
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}

.sheet-content {
  padding: 18px 20px 24px;
}

.sheet-content h2 {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #171718;
  margin-bottom: 18px;
}

.sheet-content p {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* floating label container */
.form-group.floating .input-wrap {
  position: relative;
}

/* input */
.form-group.floating input {
  width: 100%;
  height: 48px;
  padding: 14px 40px 14px 2px;
  border-bottom: 1px solid #171718;
  /* border-radius: 10px; */
  font-size: 14px;
  outline: none;
}

/* label default (hidden inside input) */
.form-group.floating label {
  position: absolute;
  /* left: 12px; */
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #999;
  background: #fff;
  padding: 0 4px;
  transition: all 0.2s ease;
  pointer-events: none;
}

/* show label when typing OR focus */
.form-group.floating input:focus + label,
.form-group.floating input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: #8E9194;
}

/* focus border */
.form-group.floating input:focus {
  border-bottom-color: #ff7900;
}

.clear-btn {
  display: none;
}

/* validation state */
.form-group {
  margin-bottom: 18px;
}

.form-group.has-error input {
  border-bottom: 1px solid #eb2330;
  color: #c81e2b;
}

.form-group.has-error label {
  color: #c81e2b !important;
}

.error-message {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #c81e2b;
  align-items: center;
  gap: 6px;
}

.error-message.show {
  display: flex;
}

.error-message::before {
  content: "!";
  width: 14px;
  height: 14px;
  border: 1px solid #c81e2b;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  flex-shrink: 0;
}

.form-group.has-error .clear-btn {
  display: block;
}

#agreeGroup.has-error .checkmark {
  border: 1px solid #eb2330;
}

#termsGroup.has-error .checkmark {
  border: 1px solid #eb2330;
}

#termsError {
  margin-top: -20px;
  margin-bottom: 20px;
}
/* ===== Coverage popup ===== */
.coverage-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.coverage-popup-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.coverage-popup {
  width: 100%;
  max-width: 284px;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 16px 18px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.coverage-popup-overlay.active .coverage-popup {
  transform: translateY(0) scale(1);
}

.coverage-popup-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d7263d;
}

.coverage-popup h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: #1f1f1f;
}

.coverage-popup-text {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 400;
  color: #7b7b7b;
}

.coverage-popup-btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f5821f;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.coverage-popup-btn:hover {
  background: #e87511;
}

.coverage-popup-btn:active {
  transform: scale(0.98);
}

body.popup-open {
  overflow: hidden;
}

/* mobile full width feeling */
@media (max-width: 420px) {
  .bottom-sheet {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
  }

  .sheet-content {
    padding: 18px 16px 24px;
  }
}

/* Responsive */
@media (max-width: 420px) {
  /* .page {
      padding: 10px; 
  } */

  .wifi-card {
    max-width: 100%;
    /* border-radius: 24px; */
  }

  .hero-title .big {
    font-size: 44px;
  }

  .hero-title .small {
    font-size: 18px;
    padding: 5px 12px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .content h1 {
    font-size: 20px;
  }
}

/* ===== Connected success screen - append only ===== */

.wifi-card-connected {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.connected-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 42px 24px 56px;
}

.status-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #39c45a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}

.status-icon span {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.connected-title {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #222222;
  margin-bottom: 10px;
}

.connected-subtitle {
  max-width: 250px;
  font-size: 14px;
  line-height: 1.55;
  color: #6f6f6f;
  margin-bottom: 18px;
}

.trial-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f1f1;
  border-radius: 50px;
  padding: 7px 14px;
  font-size: 13px;
  line-height: 1;
  color: #555555;
}

.trial-icon {
  font-size: 12px;
  color: #666666;
}

.trial-pill .divider {
  color: #9b9b9b;
}

.trial-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

@media (max-width: 420px) {
  .connected-content {
    padding: 38px 20px 48px;
  }

  .status-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
  }

  .status-icon span {
    font-size: 40px;
  }

  .connected-title {
    font-size: 20px;
  }

  .connected-subtitle {
    font-size: 14px;
    max-width: 240px;
  }

  .trial-pill {
    font-size: 12px;
    padding: 7px 12px;
    gap: 7px;
  }
}

/* wellcomeback.html */
.reconnect-btn-div {
  margin-top: auto;
  padding: 0 18px 18px;
}
.reconnect-btn {
  display: block;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 50px;
  background: #ff8200;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reconnect-btn:hover {
  background: #f07700;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'NotoSansKhmer';
    src: url('../fonts/noto_sans_khmer/NotoSansKhmer-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'NotoSansSC';
    src: url('../fonts/noto_sans/NotoSans-Regular.ttf') format('truetype');
}

/* Chinese */
.lang-en, .connect-btn body {
    font-family: 'Inter', sans-serif !important;
}

/* Khmer */
.lang-kh, body, input, button {
    font-family: 'NotoSansKhmer', sans-serif !important;
    line-height: 1.8;
}

/* Chinese */
.lang-cn, .connect-btn body {
    font-family: 'NotoSans', sans-serif !important;
}

/* Khmer */
.lang-kh .hero-banner {
  background-image: url("../img/banner-kh.png");
}

/* Chinese */
.lang-cn .hero-banner {
  background-image: url("../img/banner-zh.png");
}
