/* Fonts and colours follow the existing Stoni theme. No external font requests. */
.premium-stones-gallery .psg-card {
  --psg-menu-background: #d5bd89;
  --psg-menu-color: #fff;
  --psg-menu-hover-background: rgba(31, 24, 20, .8);
  --psg-menu-hover-color: #fff;
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  text-align: left;
  overflow: visible;
}
.premium-stones-gallery .psg-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 48%;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, .38) 0%,
    rgba(0, 0, 0, .28) 18%,
    rgba(0, 0, 0, .15) 40%,
    rgba(0, 0, 0, .06) 64%,
    rgba(0, 0, 0, .015) 82%,
    transparent 100%);
  pointer-events: none;
}
.premium-stones-gallery .psg-card > a { display: block; }
.premium-stones-gallery .psg-card > a > img {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}
.premium-stones-gallery .psg-card__title {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  box-sizing: border-box;
  padding: 13px 14px;
  background: none;
  color: #fff;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  overflow-wrap: anywhere;
  pointer-events: none;
}
.premium-stones-gallery button.psg-card__toggle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--psg-menu-color);
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: color .2s ease;
}
.premium-stones-gallery .psg-card__toggle::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(213, 189, 137, .9);
  background: var(--psg-menu-background);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .12);
  transition: background-color .2s ease, border-color .2s ease;
}
.premium-stones-gallery .psg-card__toggle:hover::before,
.premium-stones-gallery .psg-card__toggle[aria-expanded='true']::before {
  background: var(--psg-menu-hover-background);
  border-color: #d5bd89;
}
.premium-stones-gallery .psg-card__toggle:hover,
.premium-stones-gallery .psg-card__toggle[aria-expanded='true'] {
  color: var(--psg-menu-hover-color);
}
.premium-stones-gallery .psg-card__toggle svg {
  position: relative;
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}
.premium-stones-gallery .psg-card__panel {
  position: absolute;
  right: 10px;
  bottom: 52px;
  z-index: 5;
  width: min(220px, calc(100% - 20px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid rgba(172, 155, 121, .35);
  border-top: 2px solid #cbbc9d;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  line-height: 1.4;
}
.premium-stones-gallery .psg-card__panel[hidden],
.psg-modal[hidden] { display: none !important; }
.premium-stones-gallery button.psg-card__action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #232323;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: none;
}
.premium-stones-gallery .psg-card__action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #ac9b79;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.premium-stones-gallery .psg-card__action:hover,
.premium-stones-gallery .psg-card__action:focus-visible { background: #f4f1eb; }
.premium-stones-gallery .psg-card button:focus-visible,
.psg-modal button:focus-visible,
.psg-modal input:focus-visible {
  outline: 2px solid #ac9b79;
  outline-offset: 2px;
}
.premium-stones-gallery .psg-item--open { position: relative; z-index: 10; }
.psg-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 8vh 16px 24px;
  color: #232323;
}
.psg-modal__overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); }
.psg-modal__dialog {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  padding: 36px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .15);
}
.psg-modal h3.psg-modal__title {
  margin: 0 25px 22px 0;
  padding: 0;
  color: #232323;
  font-family: Raleway, sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.psg-modal button.psg-modal__close {
  position: absolute;
  top: 9px;
  right: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ac9b79;
  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}
.psg-modal .psg-contact-form { margin: 0; }
.psg-modal .psg-field {
  display: block;
  margin: 0 0 19px;
  color: #616161;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.psg-modal .psg-field .wpcf7-form-control-wrap { display: block; margin: 0; }
.psg-modal .psg-field input {
  display: block;
  width: 100%;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
  color: #232323;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: none;
}
.psg-modal .psg-field input:focus {
  border-bottom-color: #ac9b79;
  box-shadow: 0 1px 0 #ac9b79;
}
.psg-modal .psg-field input:focus-visible { outline: none; }
.psg-modal .psg-field input.wpcf7-not-valid { border-bottom-color: #b42e2e; }
.psg-modal .psg-submit { margin: 26px 0 0; }
.psg-modal .psg-contact-form input[type='submit'] {
  width: auto;
  height: auto;
  min-height: 48px;
  margin: 0;
  padding: 14px 23px;
  border: 1px solid #232323;
  border-radius: 0;
  background: #fff;
  color: #232323;
  font-family: Raleway, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
}
.psg-modal .psg-contact-form input[type='submit']:hover {
  border-color: #cbbc9d;
  background: #cbbc9d;
}
.psg-modal .wpcf7-response-output {
  margin: 20px 0 0 !important;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.psg-modal .wpcf7-not-valid-tip { font-size: 12px; line-height: 1.4; }
@media (max-width: 767px) {
  .premium-stones-gallery .psg-card__title { padding: 10px; font-size: 14px; }
  .psg-modal { padding-top: 6vh; }
  .psg-modal__dialog { padding: 28px 24px; }
  .psg-modal h3.psg-modal__title { font-size: 27px; }
}
@media (pointer: coarse) {
  .premium-stones-gallery button.psg-card__action { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .premium-stones-gallery .psg-card__toggle,
  .premium-stones-gallery .psg-card__toggle::before { transition: none; }
}
