.lm-widget {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 1.5rem auto;
  max-width: 520px;
}
.lm-widget *, .lm-widget *::before, .lm-widget *::after { box-sizing: border-box; }

/* Card style (default) */
.lm-style-card .lm-inner {
  background: #fff;
  border: 1px solid #e5e0da;
  border-radius: 16px;
  padding: 2rem 2.25rem;
  text-align: center;
}

/* Minimal style */
.lm-style-minimal .lm-inner {
  border-left: 3px solid #c8a97e;
  padding: 1.25rem 1.5rem;
  border-radius: 0;
}
.lm-style-minimal { text-align: left; }

.lm-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.lm-icon svg {
  width: 40px;
  height: 40px;
  stroke: #c8a97e;
}
.lm-style-minimal .lm-icon { display: none; }

.lm-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1208;
  margin: 0 0 .5rem;
  line-height: 1.25;
}
.lm-desc {
  font-size: 14px;
  color: #6b5d4f;
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

.lm-form { display: flex; flex-direction: column; gap: 10px; }

.lm-field { display: flex; flex-direction: column; }

.lm-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
  color: #111;
  background: #fafafa;
  font-family: inherit;
}
.lm-input:focus { border-color: #c8a97e; background: #fff; }
.lm-input::placeholder { color: #aaa; }

.lm-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #2d1f0e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
  margin-top: 4px;
}
.lm-btn:hover { background: #1a1208; }
.lm-btn:active { transform: scale(0.98); }
.lm-btn:disabled { background: #9a8878; cursor: not-allowed; transform: none; }

.lm-success {
  margin-top: 12px;
  padding: 12px 16px;
  background: #edfaef;
  border: 1px solid #b7e4c2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1a7f37;
  text-align: center;
}
.lm-error {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 14px;
  color: #b91c1c;
  text-align: center;
}

.lm-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: #a0917f;
  margin: 12px 0 0;
}
.lm-privacy svg { flex-shrink: 0; stroke: #a0917f; }
.lm-style-minimal .lm-privacy { justify-content: flex-start; }

.lm-popup-open { overflow: hidden; }

.lm-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, .62);
  opacity: 0;
  transition: opacity .18s ease;
}
.lm-popup-overlay.is-visible { opacity: 1; }
.lm-popup-overlay[hidden] { display: none; }

.lm-popup-widget {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  margin: 0;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .28);
  transform: translateY(10px) scale(.98);
  transition: transform .18s ease;
}
.lm-popup-overlay.is-visible .lm-popup-widget {
  transform: translateY(0) scale(1);
}

.lm-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, .72);
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 34px;
}
.lm-popup-close:hover { background: rgba(17, 24, 39, .9); }

.lm-popup-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}
.lm-popup-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lm-popup-content {
  padding: 28px 30px 30px;
  text-align: center;
}
.lm-popup-media + .lm-popup-content { padding-top: 22px; }

.lm-popup-logo {
  width: 76px;
  height: 76px;
  margin: -58px auto 14px;
  padding: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .16);
}
.lm-popup-widget.no-media .lm-popup-logo { margin-top: 0; }
.lm-popup-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
}

.lm-popup-widget .lm-title { font-size: 24px; }
.lm-popup-widget .lm-desc { margin-bottom: 1.25rem; }
.lm-popup-widget .lm-privacy { margin-top: 13px; }

@media (max-width: 480px) {
  .lm-style-card .lm-inner { padding: 1.5rem 1.25rem; }
  .lm-title { font-size: 19px; }
  .lm-popup-overlay {
    align-items: flex-end;
    padding: 12px;
  }
  .lm-popup-widget {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }
  .lm-popup-content { padding: 24px 18px 22px; }
  .lm-popup-widget .lm-title { font-size: 21px; }
  .lm-popup-logo {
    width: 66px;
    height: 66px;
    margin-top: -50px;
  }
}
