/*  Modal Overlay  */
.scf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scf-modal {
  background: #fff;
  max-width: 1100px;
  width: 90%;
  max-height: 85vh;
  height: auto;
  overflow-y: auto;
  position: relative;
}

.scf-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  color: #404040;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

.scf-modal-close:hover {
  color: #000;
}

.scf-modal-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
}

/*  Gallery (left column)  */
.scf-modal-gallery {
  width: 45%;
  min-width: 45%;
  overflow-y: auto;
  max-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  align-content: start;
}

.scf-modal-img {
  width: 100%;
  height: auto;
  display: block;
}

.scf-modal-img--wide {
  grid-column: 1 / -1;
}

/* First image spans full width */
.scf-modal-img:first-child {
  grid-column: 1 / -1;
}

/*  Details (right column)  */
.scf-modal-details {
  width: 55%;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

/* Header */
.scf-modal-header {
  text-align: center;
  margin-bottom: 8px;
}

.scf-modal-subtitle {
  font-size: var(--text-m);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #929292;
  margin-bottom: 4px;
}

.scf-modal-title {
  font-size: var(--text-xl);
  font-weight: 600;
  text-transform: uppercase;
  color: #8b0000;
  margin: 0 0 8px 0;
}

.scf-modal-location {
  font-size: var(--text-m);
  color: #404040;
  margin-bottom: 2px;
}

.scf-modal-age {
  font-size: var(--text-s);
  color: #929292;
}

/* Slogan */
.scf-modal-slogan {
  text-align: center;
  font-family: "Parisienne";
  font-size: var(--text-l);
  color: #404040;
  padding: 0 8px;
  line-height: 1.5;
}

.scf-modal-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: var(--text-s);
  border-bottom: 1px solid #f0f0f0;
}

.scf-modal-label {
  font-weight: 600;
  color: #404040;
}

.scf-modal-value {
  color: #404040;
  text-align: end;
  max-width: 85%;
}

/* Sedpoints */
.scf-modal-sedpoints {
  padding: 12px 0;
}

.scf-modal-sedpoint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  font-size: var(--text-s);
  color: #404040;
  line-height: 1.6;
  margin-bottom: 2px;
}
.scf-modal-sedpoint-arrow {
  padding-top: 1px;
}

.scf-modal-sedpoint-text {
  font-size: var(--text-s);
  color: #404040;
}

/* Buttons */
.scf-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
}

.scf-modal-btn {
  display: block;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.scf-modal-btn-profile {
  background: #404040;
  color: #fff;
}

.scf-modal-btn-profile:hover {
  background: #333;
  color: #fff;
}

.scf-modal-btn-book {
  background: #fff;
  color: #8b0000;
  border: 1px solid #8b0000;
}

.scf-modal-btn-book:hover {
  background: #8b0000;
  color: #fff;
}

/*  Preview Button on Card  */
.scf-preview-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.oxy-post:hover .scf-preview-btn {
  opacity: 1;
}

.scf-preview-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.sedcard-picker__item:hover .scf-preview-btn {
  opacity: 1;
}

/*  Loading  */
.scf-modal-loading {
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #929292;
  font-size: 14px;
}

/*  Scrollbar  */
.scf-modal-gallery::-webkit-scrollbar {
  width: 3px;
}
.scf-modal-gallery::-webkit-scrollbar-track {
  background: transparent;
}
.scf-modal-gallery::-webkit-scrollbar-thumb {
  background: #ccc;
}

.scf-modal::-webkit-scrollbar {
  width: 3px;
}
.scf-modal::-webkit-scrollbar-track {
  background: transparent;
}
.scf-modal::-webkit-scrollbar-thumb {
  background: #ccc;
}

/*  Responsive */
@media (max-width: 767px) {
  .scf-modal {
    max-height: 90vh;
    max-width: 95%;
    overflow-y: auto;
  }

  .scf-modal-content {
    flex-direction: column;
  }

  .scf-modal-close {
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 12px;
    right: 12px;
  }

  /* Slider wrapper with fixed height */
  .scf-modal-gallery {
    width: 100%;
    min-width: 100%;
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
    display: flex;
    flex-direction: row;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding: 0;
    scrollbar-width: none;
    overflow-anchor: none;
  }

  .scf-modal-gallery::-webkit-scrollbar {
    display: none;
  }

  .scf-modal-img {
    min-width: 85%;
    width: 85%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    flex-shrink: 0;
    padding-right: 4px;
  }
  .scf-modal-img--wide {
    display: none;
  }

  .scf-modal-img:first-child {
    grid-column: unset;
  }

  .scf-modal-details {
    width: 100%;
    padding: 20px 16px;
  }

  .scf-modal-title {
    font-size: 18px;
  }
  .scf-modal-value {
    max-width: 65%;
  }

  /* Dots */
  .scf-modal-dots {
    display: flex !important;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
    width: 100%;
  }

  .scf-modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s;
  }

  .scf-modal-dot.active {
    background: #404040;
  }
}

/* Hide dots on desktop */
.scf-modal-dots {
  display: none;
}
