/*
 * Tour listings: /country/{slug}, /category/{slug}, group tours,
 * independent tours and corporate projects
 * (src/pages/country/[slug].js, src/pages/category/*.js,
 * components/Tour/ToursWithFilter.js).
 */

/* ---- size?.width > 790 blocks (useWindowSize) ---------------------- */
@media (max-width: 790px) {
  .an-wide-only {
    display: none !important;
  }
}
/* size?.width < 790 && "px-[20px]" */
@media (max-width: 789.98px) {
  .an-narrow-px-20 {
    padding-left: 20px;
    padding-right: 20px;
  }
}
/* size?.width < 700 ? "… mt-[1px] …" : "… mt-2 …" */
@media (max-width: 699.98px) {
  .an-narrow-mt-1px {
    margin-top: 1px !important;
  }
}

/* ---- antd Form.Item spacing classes (antd styles had lower priority
 *      than the Tailwind classes put on the Form.Item) ---------------- */
.an-field.mb-0 {
  margin-bottom: 0;
}
.an-field.mb-\[10px\] {
  margin-bottom: 10px;
}

/* antd vertical form labels have their own colour: they did not inherit
 * the text-white of the filter bars. */
.an-tours-filter-form .an-field > label {
  color: rgba(0, 0, 0, 0.88);
}
/* antd Select inherited the uppercase of the bar; bootstrap's reboot
 * resets it on native selects. */
.an-tours-filter-form select.an-select {
  text-transform: uppercase;
}

/* Tour item wrapper used for filtering: invisible in the layout, so the
 * card stays a direct grid child as in React. */
.an-tour-item {
  display: contents;
}
.an-tour-item[hidden],
[data-an-tour][hidden] {
  display: none !important;
}

/* ---- antd Image (country travel guide gallery) --------------------- */
.an-image {
  position: relative;
  display: inline-block;
}
.an-image__img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.an-image__mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
  line-height: 1.5714;
}
.an-image:hover .an-image__mask {
  opacity: 1;
}
.an-image__mask-info {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
}
.an-image__mask-info svg {
  margin-inline-end: 4px;
}
.an-image-preview {
  position: fixed;
  inset: 0;
  z-index: 100005;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
  animation: an-image-in 0.2s ease-out;
}
.an-image-preview img {
  max-width: 100%;
  max-height: 100%;
  cursor: default;
}
.an-image-preview__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
@keyframes an-image-in {
  from {
    opacity: 0;
  }
}

/* ---- Enquiry forms (independent tours, corporate projects) --------- */
/* Input.TextArea showCount */
.an-count-wrap {
  position: relative;
}
.an-count {
  position: absolute;
  bottom: -22px;
  right: 0;
  color: rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: none;
  font-size: 14px;
  line-height: 1.5714;
}
/* antd InputNumber hides the browser spinners behind its own handlers */
.an-input[type='number'] {
  -moz-appearance: textfield;
}

/* <Button size="large" className="thm-btn comment-form__btn">: what the
 * antd large button added under the theme button. */
.an-enquiry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  white-space: nowrap;
  line-height: 1.5714;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
  touch-action: manipulation;
  user-select: none;
}
.an-enquiry-btn:not(:disabled):hover {
  color: #4096ff;
}
.an-enquiry-btn:disabled,
.an-enquiry-btn.is-loading {
  cursor: not-allowed;
  color: rgba(0, 0, 0, 0.25);
  background-color: rgba(0, 0, 0, 0.04);
  box-shadow: none;
}
.an-enquiry-btn:disabled::after {
  display: none;
}

/* Country page: permanent country name over the main image
   (Website Redesign brief, "Fixes For Country Page Titles"). */
.an-country-hero .page-header__top {
  display: flex;
  align-items: center;
  justify-content: center;
}
.an-country-hero .page-header__top > .container {
  position: relative;
  z-index: 1;
}
.an-country-hero__title {
  margin: 0;
  color: #fff;
  font-family: PantonRustExtraBoldBase, 'Baloo Paaji 2', sans-serif;
  font-size: clamp(38px, 9vw, 120px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 4px 18px rgba(0, 0, 0, 0.45);
  overflow-wrap: break-word;
  hyphens: auto;
}
