.lwlqe-inline-wrap,
.lwlqe-popup-trigger-wrap,
.lwlqe-modal {
  --lwlqe-bg: #ffffff;
  --lwlqe-text: #1c1a17;
  --lwlqe-muted: #6e675f;
  --lwlqe-border: rgba(30, 24, 18, 0.12);
  --lwlqe-accent: #8b6a3f;
  --lwlqe-accent-dark: #71522d;
  --lwlqe-shadow: 0 20px 60px rgba(13, 11, 8, 0.12);
  --lwlqe-radius: 18px;
  --lwlqe-input-radius: 12px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.lwlqe-card {
  background: linear-gradient(180deg, #fff 0%, #fbf8f4 100%);
  border: 1px solid var(--lwlqe-border);
  border-radius: var(--lwlqe-radius);
  box-shadow: var(--lwlqe-shadow);
  padding: 28px;
  color: var(--lwlqe-text);
}

.lwlqe-card__header h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lwlqe-card__header p {
  margin: 0 0 24px;
  color: var(--lwlqe-muted);
  font-size: 15px;
  line-height: 1.7;
}

.lwlqe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lwlqe-field,
.lwlqe-budget-block {
  margin-bottom: 18px;
}

.lwlqe-field--full {
  grid-column: 1 / -1;
}

.lwlqe-field label,
.lwlqe-group-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--lwlqe-text);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.lwlqe-field label span,
.lwlqe-group-label span {
  color: #a3342b;
}

.lwlqe-field input,
.lwlqe-field select,
.lwlqe-field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--lwlqe-border);
  background: #fff;
  color: var(--lwlqe-text);
  border-radius: var(--lwlqe-input-radius);
  padding: 12px 14px;
  font-size: 15px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease;
  box-sizing: border-box;
}

.lwlqe-field textarea {
  min-height: 140px;
  resize: vertical;
}

.lwlqe-field input:focus,
.lwlqe-field select:focus,
.lwlqe-field textarea:focus {
  outline: none;
  border-color: rgba(139,106,63,.7);
  box-shadow: 0 0 0 4px rgba(139,106,63,.12);
}

.lwlqe-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--lwlqe-border);
  border-radius: var(--lwlqe-input-radius);
  background: rgba(255,255,255,.75);
}

.lwlqe-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  font-size: 15px;
}

.lwlqe-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.lwlqe-open-modal,
.lwlqe-submit {
  appearance: none;
  border: 0;
  background: linear-gradient(135deg, var(--lwlqe-accent), var(--lwlqe-accent-dark));
  color: #fff;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(113, 82, 45, 0.28);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.lwlqe-open-modal:hover,
.lwlqe-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(113, 82, 45, 0.34);
}

.lwlqe-submit[disabled] {
  opacity: .7;
  cursor: wait;
}

.lwlqe-loader {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(139,106,63,.25);
  border-top-color: var(--lwlqe-accent-dark);
  display: none;
  animation: lwlqeSpin .8s linear infinite;
}

.lwlqe-form.is-loading .lwlqe-loader {
  display: inline-block;
}

@keyframes lwlqeSpin {
  to { transform: rotate(360deg); }
}

.lwlqe-response {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.lwlqe-response.is-success {
  background: #eef7f1;
  color: #215b33;
  border: 1px solid #cfe8d7;
}

.lwlqe-response.is-error {
  background: #fbefef;
  color: #882d2d;
  border: 1px solid #efcece;
}

.lwlqe-hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lwlqe-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.lwlqe-modal.is-active {
  display: block;
}

.lwlqe-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 18, 14, 0.62);
  backdrop-filter: blur(5px);
}

.lwlqe-modal__dialog {
  position: relative;
  max-width: 860px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: auto;
  z-index: 2;
}

.lwlqe-modal .lwlqe-card {
  padding-top: 46px;
}

.lwlqe-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 3;
  background: rgba(25, 22, 18, 0.08);
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #3a3129;
}

.lwlqe-admin-table-wrap {
  background: #fff;
  border: 1px solid #dcdcde;
  padding: 8px;
}

@media (max-width: 767px) {
  .lwlqe-card {
    padding: 20px;
    border-radius: 16px;
  }

  .lwlqe-grid {
    grid-template-columns: 1fr;
  }

  .lwlqe-card__header h3 {
    font-size: 24px;
  }

  .lwlqe-open-modal,
  .lwlqe-submit {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .lwlqe-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lwlqe-modal__dialog {
    width: calc(100% - 18px);
    margin: 9px auto;
    max-height: calc(100vh - 18px);
  }
}


body.lwlqe-modal-open {
  overflow: hidden;
}

.lwlqe-modal[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lwlqe-modal:not(.is-active) .lwlqe-modal__dialog {
  display: none;
}

.lwlqe-modal.is-active .lwlqe-modal__dialog {
  display: block;
}
