/* ═══════════════════════════════════════════════
   ULALA BEAUTY INSTITUTE — modals.css
   ═══════════════════════════════════════════════ */

/* ── Backdrop ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease;
}

.modal-backdrop.open {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  pointer-events: all;
}

/* ── Modal box ── */
.modal {
  display: none;               /* ukryj wszystkie domyślnie */
  position: relative;
  background: var(--white);
  width: 90vw;
  max-width: 900px;
  min-width: 0;
  max-height: 88vh;
  overflow: hidden;
  grid-template-columns: 420px 1fr;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition:
    opacity 0.38s ease,
    transform 0.38s ease;
  pointer-events: none;
}

.modal.active {
  display: grid;               /* pokaż tylko aktywny */
}

.modal-backdrop.open .modal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── Modal image side ── */
.modal-img {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #1a1a1a;
}

.modal-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, transparent 60%);
}

.modal-img-tag {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 500;
  background: rgba(0,0,0,0.5);
  padding: 6px 12px;
  backdrop-filter: blur(4px);
}

/* ── Modal content side ── */
.modal-body {
  padding: 48px 44px 44px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: var(--black);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.25s ease;
}

.modal-close:hover { background: var(--accent); }

.modal-close svg {
  width: 14px;
  height: 14px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.modal-tag {
  font-size: 8px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-weight: 500;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--black);
}

.modal-divider {
  width: 36px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 24px;
  flex-shrink: 0;
}

.modal-desc {
  font-size: 13px;
  line-height: 1.9;
  color: var(--mid-gray);
  margin-bottom: 20px;
  flex: 1;
}

/* ── Details list ── */
.modal-details {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-details li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
  color: var(--mid-gray);
  line-height: 1.5;
}

.modal-details li::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent);
  margin-top: 9px;
  flex-shrink: 0;
}

/* ── CTA inside modal ── */
.modal-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.modal-btn-booksy {
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 13px 28px;
  display: inline-block;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.modal-btn-booksy:hover { background: var(--accent); }

.modal-btn-close-text {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-gray);
  cursor: pointer;
  font-family: var(--font-body);
  background: none;
  border: none;
  padding: 0;
  transition: color 0.25s ease;
}

.modal-btn-close-text:hover { color: var(--black); }

/* ── Scrollbar inside modal ── */
.modal-body::-webkit-scrollbar       { width: 3px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .modal.active {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }

  .modal-img {
    min-height: 240px;
    max-height: 260px;
  }

  .modal-body {
    padding: 32px 28px 28px;
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 480px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal.active { max-height: 95vh; }
}
