/* styles.css */

/* Hidden Attribute */
[hidden] {
  display: none !important;
}

/* Hidden Class */
.hidden {
  display: none;
}

/* Charcoal Palette*/
:root {
  --primary-color:rgb(60, 60, 60);
  --secondary-color:rgb(60, 60, 60, 0.4);
  --button-color:rgb(255, 255, 255);
}

/* Disable pull-to-refresh */
html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
  forced-color-adjust: none; /* Disable browser theme override */
}

/* Disable text selection */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.tiled-background {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: var(--primary-color);
  background-image: url('/images/tile.png');
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
  text-align: center;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

/* Remove focus and active visual state */
button {
  -webkit-user-select: none; /* Prevent text selection in Safari */
  -moz-user-select: none; /* Prevent text selection in Firefox */
  -ms-user-select: none; /* Prevent text selection in IE */
  user-select: none; /* Standard syntax for disabling text selection */
}


/* TITLES --------------------------------------------  */

.site-heading {
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
}

.site-subtitle {
  font-size: 1.25rem;
  color: white;
}

/* LOGOS ----------------------------------------------------------------- */
.splash-container {
  position: fixed;
  top: 40%;
  width: 100%;
  height: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.coming-soon-text {
  margin-top: 8px;
  font-weight: bold;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.logo-container {
  position: fixed;
  top: 0px;
  width: 90%;
  height: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.main-logo-img {
  width: 192px;
  height: 74px;
  margin: 0;
  display: block;
  transition: transform 0.2s ease;
}






/* LISTINGS VIEW --------------------------------------------  */

/* Wrapper that clips the scrolling content */
.listings-wrapper {
  position: absolute;
  top: 140px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;         /* scrolling only inside this area */
  z-index: 0;
  background: transparent;
}

.listings-container {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s;

  -webkit-overflow-scrolling: touch; /* smooth scrolling for iOS */
  margin-top: 0rem;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.listings-container.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}




/* NAVIGATIONS ---------------------------------------------------------- */

.nav-container {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s;

  position: fixed;
  top: 80px;
  width: 100%;
  height: 32px;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
  align-items: center;
  gap: 4rem; /* space between buttons */
  z-index: 1;
}

.nav-container.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cmd-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cmd-btn:focus {
  outline: none;
}

.cmd-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5; /* dim the button */
}

.cmd-button-img {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}

.cmd-btn:active .cmd-button-img {
  transform: scale(0.9);
  filter: brightness(0.85);
  transition-duration: 0.1s;
  transition-timing-function: ease-out;
}

.cmd-btn:disabled .cmd-button-img {
  filter: grayscale(100%) brightness(0.7);
  transform: none !important; /* prevent scale effect */
  transition: none; /* no animation */
}



/* PLACE CARD BUTTONS ------------------------------------- */

.call-button-img {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.menu-button-img {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}


.location-button-img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.css-place-address-container {
  display: flex;
  align-items: center;
  gap: 6px;
}


/*---------- scrollable list -------------------*/
.scrollable-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.checkbox-item {
    margin-bottom: 5px;
}



/*---------- image preview -------------------*/
.image-preview-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0px;
  background: #00000059;
  display: flex;
  align-items: center;
  justify-content: center;
}



/* -------------------- Browse Images Modal -------------------- */
/* Browse Images Modal uses EDIT MODAL with custom values */
#browseImagesModal {
  top: 80px;
}

/* The single scrollable div */
.browse-content {
  flex: 1;
  max-height: 75vh;
  overflow-y: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Each row */
.browse-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  width: 100%;
  cursor: pointer;
  border-radius: 6px;
  box-sizing: border-box;
  transition: background 0.15s;
}

.browse-row:hover {
  background: rgba(0,0,0,0.05);
}

.browse-row.selected {
  background-color: rgba(0,123,255,0.2);
}

.browse-row img.thumb,
.browse-row .icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
}

.browse-row .name {
  flex-grow: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}





/* CATEGORIES -----------------------------------------------------------------*/

.ccss-btn-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.ccss-btn {
  display: block;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;

  max-width: 22rem;
  width: 90%;
  margin: 0.25rem auto;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  text-align: left;

  opacity: 0;
  transform: translateY(30px) translateX(0px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ccss-btn.visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.ccss-btn-texts {
  display: flex;
  justify-content: space-between;
  flex: 1;
  margin: 0 0.5rem;
}

.ccss-btn .ccss-btn-text {
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--primary-color);
}

.ccss-btn .ccss-btn-subtext {
  font-size: 0.875rem;
  text-align: right;
  color: var(--secondary-color);
}

.ccss-btn:active {
  background-color: rgba(255, 255, 255, 0.9);
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}





/* PAGE TITLE -----------------------------------------------------------------*/

.ccss-pagetitle-container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 16rem;
  margin-bottom: 1rem;
}

.ccss-pagetitle-text-left {
  width: 50%;
  text-align: left;
  font-weight: 600;
  color: white;
}

.ccss-pagetitle-text-right {
  width: 50%;
  text-align: right;
  color: rgba(255, 255, 255, 0.5);
}




/* PLACE CARD -----------------------------------------------------------------*/

.ccss-place-container {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  max-width: 20rem;
  width: 90%;
  margin: 0 auto;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;

  opacity: 0;
  transform: translateY(30px) translateX(0px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ccss-place-container.visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.ccss-place-hover:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ccss-place-container.active {
  background-color: rgba(255, 255, 255, 0.9);
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Faded style for inactive places */
.ccss-place-container.inactive-place {
  opacity: 0.5;
  background-color: #f0f0f0;
}

/* PLACE THINGS -------------------------------------------------------- */

.css-place-title {
  all: unset;
  display: inline-block;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--primary-color);
}

.css-place-menu-icon {
  all: unset;
  display: inline-block;
  margin-left: 1rem;
  cursor: default;
  line-height: 1;
  opacity: 1;
  transition: opacity 0.2s;
}

.css-place-menu-icon.hidden {
  opacity: 0;
  pointer-events: none;
}

.css-place-menu-icon.dimmed {
  opacity: 0.3;
  pointer-events: none;
}

.css-place-phone {
  all: unset;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
  line-height: 1.7;
  display: flex;
}

.css-place-phone-link {
  all: unset;
  display: inline-block;
  text-decoration: none;
  margin-right: 0.5rem;
  line-height: 2;
  vertical-align: middle;
}

.css-place-details {
  max-height: 0;
  overflow: hidden;
  font-size: 0.875rem;
  color: var(--primary-color);
  transition: max-height 0.2s ease;
}

.css-place-details-expanded {
  max-height: 1000px;
  transition: max-height 0.2s ease;
}

.css-place-desc {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--primary-color);
}

.css-place-desc-en {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--secondary-color);
}

.css-place-address {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--primary-color);
}

.css-place-expand-arrow {
  position: absolute;
  bottom: 0;
  right: 0;
  cursor: pointer;
  padding: 8px;
  font-size: 0.75rem;
  color: var(--secondary-color);
  pointer-events: none;
}

.expand-click-area {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 100%;
  cursor: pointer;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.css-place-image {
  width: 100%;
  aspect-ratio: 16 / 9; /* enforce 16:9 crop */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 8px; /* space below image */
  height: 0;                /* start with zero height */
  transition: height 0.5s ease; /* animate height */
}

.css-place-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;      /* crop without stretch */
  object-position: center; /* center crop */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.css-place-image.loaded {
  height: auto; /* will be set dynamically in JS */
}

.css-place-image img.loaded {
  opacity: 1;
}




/* ITEM CATEGORIES -------------------------------------------------------- */

.ccss-place-title2 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.5rem;
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.ccss-itemcategory-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.ccss-itemcategory-btn {
  margin: 0.5rem;
  padding: 0.5rem 1rem;
  width: 16rem;
  background-color: white;
  color: var(--primary-color);
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  text-align: left;
}

.ccss-itemcategory-name-tr {
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
  color: var(--primary-color);
}

.ccss-itemcategory-name-en {
  font-size: 0.875rem;
  color: var(--secondary-color);
  text-align: right;
}





/* ITEMS LISTER ---------------------------------------------------------------------------------- */

.items-wrapper {
  width: 100%;
  max-width: 100%;
}

/* Common Item Styles */
.item {
    cursor: pointer;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;

    max-width: 30rem;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    text-align: left;

    opacity: 0;
    transform: translateY(30px) translateX(0px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.item.visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.item-disabled {
  background-color: #ffffff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  text-align: left;
  max-width: 38rem;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease, background-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;

  opacity: 0;
  transform: translateY(30px) translateX(0px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.item-disabled.visible {
  opacity: 0.5;
  transform: translateY(0) translateX(0);
}

.item-details-closed {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.item-details-open {
    overflow: visible;
    transition: all 0.5s ease;
}


/* THE ITEM --------------------------------------------------------------- */
.move-up,
.move-down {
    cursor: pointer;
    font-size: 1rem;
    color: rgba(200, 0, 200);
    user-select: none;
}

.ccss-item-container {
  margin-bottom: 0rem;
}

.ccss-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-name-container {
    flex: 1;
    margin: 0 0.5rem;
}

.ccss-item-name-tr {
  all: unset;
  display: block;
  color: var(--primary-color);
  font-size: 1.125rem;
  font-weight: 600;
}

.ccss-item-name-en {
  all: unset;
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.ccss-item-price {
  all: unset;
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  margin-left: 1rem;
  color: #2563eb;
}

.ccss-item-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.ccss-item-details[data-open="true"] {
  transform: scaleY(1);
}

.ccss-item-desc-tr {
  all: unset;
  display: block;
  color: var(--primary-color);
  margin-top: 0.5rem;
}

.ccss-item-desc-en {
  all: unset;
  display: block;
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.ccss-item-image {
  max-width: 96px;
  max-height: 96px;
  object-fit: cover;
  border-radius: 8px;
  float: left;
  margin-right: 0.75rem;
  transition: all 0.3s ease;
}

.ccss-item-image.zoomed {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  border-radius: 8px;
  transition: all 0.3s ease;
}

