/* Pop-ul by Craiu - www.craiu.ro
   Fonturile si stilurile de baza sunt mostenite din tema activa.
   Popup-ul se integreaza vizual in site, nu impune fonturi externe. */

#lp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.70);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: lp-fade-in 0.35s ease both;
}
#lp-overlay.lp-hidden { display: none; }

@keyframes lp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Card — mosteneste font-family din body al temei */
#lp-card {
  background: var(--color-background, #f9f3ee);
  background: var(--background-color, var(--color-background, #f9f3ee));
  border-radius: 14px;
  overflow: hidden;
  max-width: 660px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 4px 16px rgba(0,0,0,0.12);
  animation: lp-slide-up 0.4s cubic-bezier(.22,1,.36,1) both;
  /* Fonturi: mostenite din tema */
  font-family: inherit;
  color: inherit;
}

@keyframes lp-slide-up {
  from { opacity: 0; transform: translateY(36px) scale(.975); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Buton inchidere */
#lp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.90);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .2s, transform .18s;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  line-height: 1;
}
#lp-close:hover { background: #fff; transform: scale(1.08); }
#lp-close svg {
  width: 15px;
  height: 15px;
  stroke: #3a2a1e;
  stroke-width: 2.2;
  fill: none;
  display: block;
}

/* Imagine hero */
#lp-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}
#lp-image-placeholder {
  width: 100%;
  height: 210px;
  background: #c9a882;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Corp popup */
#lp-body {
  padding: 20px 26px 24px;
  /* Culoare text: preferinta tema, fallback neutru inchis */
  color: var(--color-text, var(--text-color, #3a2a1e));
}

/* Bloc titlu */
#lp-title-block {
  text-align: center;
  margin-bottom: 16px;
}
#lp-date-tag {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 3px;
  /* Mosteneste font din tema */
  font-family: inherit;
}
#lp-title {
  /* Dimensiune mare dar font mostenit din tema (heading font daca tema il seteaza pe h2) */
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0;
  /* Culoare accent tema sau fallback */
  color: var(--color-primary, var(--primary-color, var(--accent-color, #5a3825)));
  font-family: var(--heading-font-family, var(--font-heading, inherit));
}
#lp-subtitle {
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  opacity: 0.7;
  margin: 4px 0 0;
  font-family: inherit;
}

/* Rand info */
#lp-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid rgba(0,0,0,0.10);
  border-bottom: 1px solid rgba(0,0,0,0.10);
  padding: 12px 0;
  margin-bottom: 14px;
}
#lp-desc-left {
  font-size: 13px;
  line-height: 1.75;
  opacity: 0.85;
  font-family: inherit;
}
#lp-contact {
  text-align: right;
  font-size: 12px;
  line-height: 1.75;
  opacity: 0.85;
  font-family: inherit;
}
#lp-contact strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  opacity: 1;
}
#lp-contact a {
  color: inherit;
  text-decoration: none;
}
#lp-contact a:hover {
  text-decoration: underline;
}

/* Descriere de jos */
#lp-desc-bottom {
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  letter-spacing: 0.03em;
  opacity: 0.65;
  margin-bottom: 16px;
  font-family: inherit;
}

/* Buton CTA — mosteneste stilul de buton al temei daca exista */
#lp-btn {
  display: block;
  width: fit-content;
  min-width: 160px;
  margin: 0 auto;
  padding: 11px 28px;
  /* Culori buton: preferinta tema */
  background-color: var(--color-primary, var(--primary-color, var(--accent-color, #5a3825)));
  color: var(--color-primary-contrast, var(--button-text-color, #fff));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border-radius: var(--button-border-radius, var(--border-radius, 40px));
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity .2s, transform .18s;
  font-family: inherit;
}
#lp-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  color: var(--color-primary-contrast, var(--button-text-color, #fff));
  text-decoration: none;
}

/* MOBILE */
@media (max-width: 500px) {
  #lp-card { border-radius: 10px; }
  #lp-image, #lp-image-placeholder { height: 155px; }
  #lp-body { padding: 14px 16px 18px; }
  #lp-title { font-size: 24px; }
  #lp-info-row { flex-direction: column; gap: 8px; }
  #lp-contact { text-align: left; }
  #lp-btn { width: 100%; box-sizing: border-box; }
}

/* ── Bara de progres auto-close ─────────────────────────────── */
#lp-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000000;
  background: rgba(255,255,255,0.15);
}
#lp-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--color-primary, var(--primary-color, #c9a882));
  opacity: 0.85;
  transform-origin: left;
}
