@font-face {
  font-family: 'Poppins-Regular';
  src: url('fonts/poppins/Poppins-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins-Medium';
  src: url('fonts/poppins/Poppins-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins-Bold';
  src: url('fonts/poppins/Poppins-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: background: rgba(0, 20, 80, 1);
  --color-text-muted: rgba(0, 20, 80, 0.6);
  --color-border: rgba(217, 223, 227, 1);
  --color-primary: rgba(159, 37, 64, 1);
  --gradient-primary: rgba(159, 37, 64, 1);
  --color-border: rgba(224, 224, 224, 1);
  --font-regular: 'Poppins-Regular', sans-serif;
  --font-medium: 'Poppins-Medium', sans-serif;
  --font-bold: 'Poppins-Bold', sans-serif;
  --color-success: rgba(159, 37, 64, 1);
}

body {font-family: var(--font-regular);}

/* Keep document scroll off so iOS does not paint homepage rows over the status bar. */
html,
body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

#app {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.main {
  min-height: 0;
}

/* No z-index: a fixed stacking context lets iOS paint these rows over the screen while scrolling. */
#app::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 50vw;
  background-image: url('images/blf_bg.png');
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 100% auto;
  pointer-events: none;
}
.card-thumb {border-radius: 25%; width: 62px; height: 62px;}
.provider-types-slider {padding: 20px 12px 7px; margin: 0 0 0 20px; top: 95px;}
.main.main--providers {padding-top: 165px}
.provider-section {background: transparent; margin: 20px 0 20px 20px; scroll-margin-top: 160px; overflow: hidden}
.provider-section-categories {-webkit-overflow-scrolling: auto;}
.provider-section-title {padding-left: 20px; font-family: var(--font-medium); font-size: 1rem; font-weight: 500; color: rgba(33, 33, 33, 1)}
.card-title {color: rgba(117, 117, 117, 1)}
#app[data-route="categories"] #content .card-grid .card .card-title, #app[data-route="subcategories"] #content .card-grid .card .card-title, #app[data-route="products"] #content .card-grid .card .card-title {color: rgba(33, 33, 33, 1); font-family: var(--font-medium); font-size: 0.875rem;}
.provider-type-chip {border: 1px solid rgba(224, 224, 224, 1); color: rgba(33, 33, 33, 1); font-family: var(--font-regular); font-size: 0.875rem;}
.provider-type-chip--active {background: rgba(159, 37, 64, .04); border-color: rgba(159, 37, 64, 1); color: rgba(159, 37, 64, 1);}
.provider-type-chip--active:hover {color: var(--color-menu-item); background: unset; border: 1px solid rgba(159, 37, 64, 1); background: rgba(159, 37, 64, .04); color: rgba(159, 37, 64, 1);}
.provider-type-chip:hover {color: var(--color-primary);}
.app-header {justify-content: flex-start;}
.app-title {margin-left: 70px;}
.form-group input, .form-group select {border-radius: 10px;}
.biller-card {border-radius: 10px;}
.form-group label {font-family: var(--font-medium);}
.form-group .bills-scan-btn, .bills-qr-scan-overlay .bills-qr-scan-close {background: var(--gradient-primary); border-radius: 10px; color: white; font-family: var(--montserrat-semibold);}
.search-bar-input:focus {box-shadow: none;}
.search-bar-input::placeholder {
  color: rgba(117, 117, 117, 1);
  font-family: var(--font-regular);
  font-size: 0.875rem;
}
.history-date-sheet-trigger-icon, .history-date-sheet-trigger {background: white}
.back-btn {background: white; border-radius: 50%;}
.app-header-history {color: var(--color-primary);}

.provider-section-categories .card-grid .card,
.providers-search-view .card-grid .card {
  box-sizing: border-box;
  align-items: center;
  text-align: center;
}

.provider-section-categories .card-grid .card-thumb,
.providers-search-view .card-grid .card-thumb {
  margin-left: auto;
  margin-right: auto;
}

.provider-section-categories .card-grid,
.providers-search-view .card-grid {
  grid-template-columns: none;
  grid-auto-columns: 100px;
}

.provider-section-categories .card,
.providers-search-view .card {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

[data-route="providers"] .search-bar-wrap {left: 0; right: 0; width: 100%; padding: 20px;}
#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card,
#app[data-route="products"] #content .card-grid .card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  text-align: left;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-thumb,
#app[data-route="products"] #content .card-grid .card .card-thumb {
  grid-column: 1;
  margin: 0;
  width: 48px;
  height: 48px;
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-content,
#app[data-route="products"] #content .card-grid .card .card-content {
  grid-column: 2;
  min-width: 0;
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-title,
#app[data-route="products"] #content .card-grid .card .card-title {
  grid-column: auto;
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-meta,
#app[data-route="products"] #content .card-grid .card .card-meta {
  grid-column: auto;
  display: inline-block;
  padding: 2px 8px;
  margin-top: 4px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgba(117, 117, 117, 1);
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-meta {
  background: #e0e0e0;
  color: rgba(0, 0, 0, 1)
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-price,
#app[data-route="products"] #content .card-grid .card .card-price {
  grid-column: 3;
  align-self: center;
  justify-self: end;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-left: 8px;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1.2;
  color: #000;
  font-weight: 400;
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-price-amount,
#app[data-route="products"] #content .card-grid .card .card-price-amount {
  font-weight: 700;
  font-size: 1rem;
}

#app[data-route="subcategories"] .subcategories-inline-panel .card-grid .card .card-price-currency,
#app[data-route="products"] #content .card-grid .card .card-price-currency {
  font-weight: 400;
  font-size: 0.75rem;
}

#app[data-route="subcategories"] #content .card-grid .card .card-thumb {
  border: 0.69px solid rgba(238, 238, 238, 1);
  box-shadow: unset;
  padding: 2px
}

.search-bar-input {
  box-sizing: border-box;
  border-radius: 10px;
}

.search-bar-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  background-color: var(--color-primary);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  cursor: pointer;
}

@media (min-width: 768px) {
  [data-route="providers"] .search-bar-wrap {
    display: flex; flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  [data-route="providers"] .search-bar-wrap .search-bar-row {
    order: 1;
    width: 350px;
    flex-shrink: 0;
  }

  [data-route="providers"] .search-bar-wrap .payment-history-bar {
    order: 2;
    width: 280px;
    margin: 0;
    flex-shrink: 0;
  }

  [data-route="providers"] .search-bar-row .search-bar {
    width: 350px;
    margin: 0;
  }

  .search-bar-input {
    width: 350px;
  }

  [data-route="providers"] .payment-history-bar-link {
    width: 280px;
    box-sizing: border-box;
    background: var(--color-primary);
    border-radius: 10px;
    padding: 13px 12px 13px 40px
  }

  .payment-history-bar-label {color: rgba(255, 255, 255, 1); font-family: var(--font-medium); font-size: 1rem; font-weight: 500;}
  .payment-history-bar-link .search-bar-icon {color: rgba(255, 255, 255, 1); background: var(--color-primary);}

  #app[data-route="categories"] #content .card-grid .card, #app[data-route="subcategories"] #content .card-grid .card, #app[data-route="products"] #content .card-grid .card {
    box-shadow: 0px 1px 15px 0px rgba(51, 51, 51, 0.1)
  }

  #app[data-route="categories"] #content .card-grid,
  #app[data-route="subcategories"] #content .subcategories-inline-panel .card-grid,
  #app[data-route="products"] #content .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  #app::before {
    content: none;
  }
}

/* Product detail page */
#app[data-route="product-detail"] {
  --detail-actions-h: 160px;
}

#app[data-route="product-detail"] .app-header {
  justify-content: flex-start;
}

#app[data-route="product-detail"] .app-title {
  margin-left: 48px;
}

#app[data-route="product-detail"] .app-header-history {
  display: none;
}

#app[data-route="product-detail"] .main {
  padding-bottom: 0;
}

#app[data-route="product-detail"] #content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px calc(32px + var(--detail-actions-h, 88px));
}

#app[data-route="product-detail"] .detail-product-name {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 16px;
  line-height: 1.3;
  font-family: var(--font-bold);
  font-weight: bold
}

#app[data-route="product-detail"] .detail-section {
  width: 100%;
  margin: 0;
  padding: 20px 24px;
  background: transparent;
  border-radius: 16px;
  /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); */
  box-sizing: border-box;
  border: none;
}

#app[data-route="product-detail"] .detail-section-figure {
  width: 100%;
  margin: 0 0 30px;
}

#app[data-route="product-detail"] .detail-section-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 200px;
  margin: 0 auto;
  object-fit: contain;
}

#app[data-route="product-detail"] .detail-section-meta {
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  background: white;
  padding: 3px 15px;
  border-radius: 20px;
}

#app[data-route="product-detail"] .detail-section-meta .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

#app[data-route="product-detail"] .detail-section-meta .detail-row:last-child {
  border-bottom: none;
}

#app[data-route="product-detail"] .detail-label {
  color: rgba(33, 33, 33, 1);
  font-size: 0.875rem;
  font-family: var(--font-regular);
}

#app[data-route="product-detail"] .detail-value {
  color: rgba(33, 33, 33, 1);
  font-size: 0.875rem;
  font-family: var(--font-medium);
}

#app[data-route="product-detail"] .detail-section-meta .detail-row:first-child .detail-value {
  text-transform: capitalize;
}

#app[data-route="product-detail"] .detail-section-meta .detail-row:not(:first-child) .detail-value {
  font-family: var(--font-medium);
  font-size: 0.875rem;
}
#app[data-route="product-detail"] .detail-section-meta .detail-row:not(:first-child) .detail-value .price-currency {
  font-size: 10px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 3px;
}

#app[data-route="product-detail"] .detail-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  margin-top: 0;
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  /* background: rgb(241 245 248); */
  /* box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); */
  box-sizing: border-box;
}

#app[data-route="product-detail"]:has(.bottom-nav) .detail-actions {
  bottom: var(--bottom-nav-h);
}

.btn-block {font-size: 1.125rem; text-transform: capitalize; color: white; border-radius: 10px; max-width: 240px;}

#app[data-route="product-detail"] .detail-actions .btn-block {
  width: 100%;
  min-width: 0;
  flex: none;
  max-width: none;
  margin: 0;
  border-radius: 10px;
  /* text-transform: uppercase; */
  line-height: 43px;
  font-family: var(--font-medium);
}

@media (min-width: 768px) {
  #app[data-route="product-detail"] {
    --detail-actions-h: 88px;
  }

  #app[data-route="product-detail"] .detail-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  #app[data-route="product-detail"] .detail-actions .btn-block {
    width: auto;
    min-width: 160px;
    flex: 1;
    max-width: 240px;
  }
}

#app[data-route="product-detail"] .detail-actions .btn-primary {
  background: rgba(159, 37, 64, 1);
  color: #fff;
  border: none;
}

#app[data-route="product-detail"] .detail-actions .btn-primary:hover,
#app[data-route="product-detail"] .detail-actions .btn-primary:focus-visible {
  background: rgba(159, 37, 64, 1);
  color: #fff;
  opacity: 0.95;
}

#app[data-route="product-detail"] .detail-actions .detail-action--recharge,
#app[data-route="product-detail"] .detail-actions .detail-action--plans {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

#app[data-route="product-detail"] .detail-actions .detail-action--recharge:hover,
#app[data-route="product-detail"] .detail-actions .detail-action--recharge:focus-visible,
#app[data-route="product-detail"] .detail-actions .detail-action--plans:hover,
#app[data-route="product-detail"] .detail-actions .detail-action--plans:focus-visible {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  opacity: 0.95;
}

#app.productcurrencyontheright .detail-value:has(.price-currency) {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.25em;
}

@media (max-width: 768px) {
  .card-thumb {width: 58px; height: 58px;}
  #app[data-route="categories"] #content .card-grid .card .card-thumb {width: 42px; height: 42px;}
  #app[data-route="product-detail"] .detail-section {padding: 20px 0}
  #app[data-route="product-detail"] .detail-product-name {text-align: left;}
  .btn-block {max-width: 100%;}
  .transaction-item.list-card {padding: 5px 16px}
  .payment-history-bar-link {background: var(--color-primary); border-radius: 10px;}
  .payment-history-bar-label {color: rgba(255, 255, 255, 1); font-family: var(--font-medium); font-size: 1rem; font-weight: 500;}
  .payment-history-bar-link .search-bar-icon {color: rgba(255, 255, 255, 1); background: var(--color-primary);}
  .provider-types-slider {top: 165px}
  .main.main--providers {padding-top: 215px}
  .app-header {border-bottom: none}
  .provider-section {scroll-margin-top: 240px}
}
