/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */


:root {
  --primary: #B90F1A;
  --lista-primary: #075E54;
  --charcoal: #121212;
  --soft-black: #1A1A1A;
  --grey: #757575;
  --bg-color: #f6f6f6;
}

/* NEARME BOTTOM SHEET RELATED */

.nearme{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background-color: #ffffff !important;
  color: var(--lista-primary) !important;
  border-radius: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}
.nearme-container{
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  display: flex;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.5rem;
}

.ct-page-wrapper{
  display: flex;
  background-color: var(--bg-color);
  flex-direction: column;
  padding: 0 0.5rem;
  font-family: var(--wp--preset--font-family--poppins), sans-serif;
}

/* buttons/inputs don't inherit font-family by default */
.ct-page-wrapper :is(button, input, select, textarea) {
  font-family: inherit;
}

/** DISCLAIMER RELATED */

.disclaimer {
  color: var(--soft-black);
  display: block;
  text-align: center;
  line-height: 1.1;
  font-size: x-small;
  margin-top: 0 !important;
}


/** RESULTS RELATED */
#results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
  position: relative;
}



/* FAQ RELATED*/

.faq {
  margin: 1rem 0;
}

.faq-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq summary {
  font-size: 1rem;
  color: var(--charcoal) !important;
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  font-size: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.25rem;
  line-height: 1;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0.75rem 1rem;
  color: var(--soft-black);
  font-weight: 300;
  background-color: #ffffff;
  border-top: 1px solid #eee;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Limit width to 480px like a mobile even in wide screen */
body {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* BUTTON */
.cta-button,
.cta-button-outline {
  height: 2.5rem;
  padding: 0.25rem 1rem;
  border-radius: 99px;
  font-weight: thin;
  font-size: 1rem;
  text-decoration: none !important;
  box-shadow: 0 0.05rem 0.05rem rgba(0, 0, 0, 0.1);
  width: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: background-color 0.05s ease, transform 0.1s ease;
  outline: none !important;
}

.cta-button {
  background-color: var(--primary);
  color: #ffffff !important;
  border: none !important;
}

.cta-button-outline {
  background-color: #ffffff;
  color: var(--primary);
  border: 0.5px solid var(--primary);
}

.cta-button.pressed,
.cta-button-outline.pressed {
  filter: brightness(0.85);
  color: white !important;
  transform: scale(0.95);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}

/* CARD WRAPPERS */

/* Main card container should not grow beyond its container */
.no-underline {
  text-decoration: none !important;
  color: inherit;
  outline: none !important;
}

/** biz-card styling - mirrors chotu-react StoreCard.css / VipCrown.css */
.biz-card {
  --biz-card-shadow: 0 2px 8px rgba(18, 140, 126, 0.12);
  --biz-card-secondary: var(--grey);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  height: auto !important;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  background: #ffffff;
  color: #000000;
  border-radius: 0.75rem;
  box-shadow: var(--biz-card-shadow);
  line-height: 1.5;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.biz-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(18, 140, 126, 0.18);
}

.biz-card:active {
  transform: scale(0.99);
}

.biz-card:focus-visible {
  outline: 2px solid var(--lista-primary);
  outline-offset: 2px;
}

.biz-card-left {
  position: relative;
  display: flex;
  flex-shrink: 0;
}

.biz-dp {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  background: #eee url('https://i.chotu.com/DND/shop-dp.png') center / cover no-repeat;
  /* no src / broken image: hide alt text so only the placeholder shows */
  font-size: 0;
  color: transparent;
}

.biz-card-right {
  flex: 1;
  min-width: 0;
}

/* gap is 0: the &nbsp; the API emits after the crown supplies the spacing */
.biz-title-row {
  display: flex;
  align-items: center;
  gap: 0;
}

/* VIP crown: gold circle with the icon inside (mirrors chotu-react VipCrown.css).
   Used in the card title row and the nearme VIP legend. */
.crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.25rem;
  border-radius: 50%;
  background: #B8860B;
  color: #ffffff;
}

.biz-title {
  min-width: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-address {
  display: block;
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-card-arrow {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--lista-primary);
}

/* TEMP shim: crosstab pages not yet regenerated still carry the old "Order Now" CTA.
   Remove once generate_crosstab_html.php has re-pushed every crosstab. */
.biz-card-cta {
  display: none;
}

:where(.wp-site-blocks) > * {
    margin-block-start: 0rem !important;
    margin-block-end: 0;
}

/** COLLAPSIBLE POST CONTENT */
.ct-description {
  padding: 0.5rem;
  position: relative;
  font-size: 0.75rem;
  color: var(--soft-black);
  line-height: 1.4em;
  margin: 0 !important;
}

/* Clamp text to 2 lines */
.ct-desctext { 
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  position: relative;
  margin-bottom: 0 !important;
  line-height: 1.4em;
  /* Set consistent line height */
  max-height: calc(1.4em * 3);
  /* 2 lines exactly */
}

/* fade and position the Read more inline */
.read-inline {
  position: relative;
  top: 0.5rem;
  right: 0;
  bottom: 0;
  padding-right: 1rem;
  color: var(--lista-primary) !important;
  font-weight: 300;
  text-decoration: none !important;
  cursor: pointer;
  outline: none !important;
}

/* Expanded mode */
.ct-description.expanded .ct-desctext {
  -webkit-line-clamp: unset;
  max-height: none;
}

.ct-description.expanded .read-inline {
  position: static;
  display: inline;
  background: none;
}

/** COLLAPSIBLE POST CONTENT */



/* SEARCH NEAR ME RELATED */

.snm-root {
  padding: 1rem;
}

.snm-search-input {
  width: 100%;
  box-sizing: border-box;
  height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 99px;
  font-size: 1rem;
  outline: none !important;
  margin-bottom: 1rem;
}

.snm-search-input:focus {
  border-color: var(--primary);
}

.snm-heading-group {
  margin-bottom: 1.5rem;
}

.snm-heading-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.snm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.snm-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
  color: inherit;
  background: #ffffff;
  border: 0.5px solid #ececec;
  border-radius: 1rem;
  padding: 1rem 0.5rem 0.85rem;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.snm-cat-card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.snm-cat-card:active,
.snm-cat-card.snm-loading {
  transform: scale(0.96);
  box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0.1);
}

.snm-cat-card img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  flex-shrink: 0;
}

.snm-cat-card span {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  color: #222;
}

.snm-search-results[hidden] {
  display: none;
}

.snm-no-results {
  grid-column: 1 / -1;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem 0;
}

.tiny-text{
  color: var(--soft-black);
  font-size: 0.75rem;
}