.complaint-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(9, 12, 18, 0.88);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}

.complaint-overlay.hidden {
  display: none !important;
}

.complaint-modal {
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #1a2332;
  border: 1px solid #2a3548;
  border-radius: 14px;
  padding: 16px;
  color: #e8eef4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.complaint-modal h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.complaint-modal .complaint-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: rgba(232, 238, 244, 0.55);
}

.complaint-field {
  margin-bottom: 12px;
}

.complaint-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(232, 238, 244, 0.75);
}

.complaint-field input,
.complaint-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2f3e57;
  border-radius: 10px;
  background: #243044;
  color: #e8eef4;
  font-size: 15px;
  font-family: inherit;
}

.complaint-topic-picker {
  position: relative;
}

.complaint-topic-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #2f3e57;
  border-radius: 10px;
  background: #243044;
  color: #e8eef4;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.complaint-topic-label {
  flex: 1;
  line-height: 1.35;
}

.complaint-topic-label.is-placeholder {
  color: rgba(232, 238, 244, 0.45);
}

.complaint-topic-chevron {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  color: rgba(232, 238, 244, 0.55);
  transform: rotate(90deg);
}

.complaint-topic-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2095;
  background: rgba(0, 0, 0, 0.45);
}

.complaint-topic-backdrop.hidden {
  display: none !important;
}

.complaint-topic-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2100;
  max-width: 480px;
  margin: 0 auto;
  max-height: min(72vh, 520px);
  overflow: auto;
  background: #1a2332;
  border: 1px solid #2a3548;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.4);
}

.complaint-topic-sheet.hidden {
  display: none !important;
}

.complaint-topic-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 1;
}

.complaint-topic-sheet-title {
  font-size: 16px;
  font-weight: 700;
}

.complaint-topic-sheet-close {
  border: none;
  background: transparent;
  color: rgba(232, 238, 244, 0.65);
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.complaint-topic-options {
  padding: 4px 0 8px;
}

.complaint-topic-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #e8eef4;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.complaint-topic-option:last-child {
  border-bottom: none;
}

.complaint-topic-option.selected {
  color: #3d9cf5;
  font-weight: 600;
}

.complaint-topic-option:active {
  background: rgba(255, 255, 255, 0.05);
}

.complaint-field textarea {
  min-height: 100px;
  resize: vertical;
}

.complaint-consents {
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.4;
}

.complaint-consents label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.complaint-consents input {
  margin-top: 3px;
  accent-color: #3d9cf5;
}

.complaint-consents a {
  color: #9fd0ff;
}

.complaint-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.complaint-btn {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.complaint-btn-cancel {
  background: #243044;
  color: #e8eef4;
}

.complaint-btn-submit {
  background: #3d9cf5;
  color: #fff;
}

.complaint-btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.complaint-btn-danger {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
}

.complaint-success {
  text-align: center;
  padding: 8px 0 4px;
}

.complaint-success .complaint-number {
  font-size: 22px;
  font-weight: 700;
  color: #3d9cf5;
  margin: 12px 0;
}

.complaint-alert-hint {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(232, 238, 244, 0.85);
  text-align: left;
}

.complaint-alert-hint strong {
  color: #9fd0ff;
  font-weight: 700;
}

.complaint-success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.complaint-success-actions .complaint-btn {
  flex: none;
  width: 100%;
}

.complaint-error {
  color: #ff6b6b;
  font-size: 13px;
  margin: 8px 0 0;
}

.popup-complaint-wrap {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content .complaint-btn-danger {
  width: 100%;
}

/* Telegram Mini App — те же переменные и стили, что в miniapp/app.css */
body.rentcontact-miniapp .complaint-overlay,
.complaint-overlay.complaint-overlay--miniapp {
  background: rgba(0, 0, 0, 0.55);
  align-items: flex-end;
  padding: 0;
}

body.rentcontact-miniapp .complaint-modal,
.complaint-overlay.complaint-overlay--miniapp .complaint-modal {
  max-width: 480px;
  border: none;
  border-radius: 14px 14px 0 0;
  background: var(--secondary, #2c2c2e);
  color: var(--text, #f2f2f2);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

body.rentcontact-miniapp .complaint-modal .complaint-sub,
.complaint-overlay.complaint-overlay--miniapp .complaint-modal .complaint-sub {
  color: var(--hint, #8e8e93);
}

body.rentcontact-miniapp .complaint-field label,
.complaint-overlay.complaint-overlay--miniapp .complaint-field label {
  color: var(--hint, #8e8e93);
  font-size: 14px;
}

body.rentcontact-miniapp .complaint-field input,
body.rentcontact-miniapp .complaint-field textarea,
.complaint-overlay.complaint-overlay--miniapp .complaint-field input,
.complaint-overlay.complaint-overlay--miniapp .complaint-field textarea {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius, 12px);
  background: var(--bg, #1a1a1e);
  color: var(--text, #f2f2f2);
  font-size: 16px;
}

body.rentcontact-miniapp .complaint-topic-trigger,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-trigger {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius, 12px);
  background: var(--bg, #1a1a1e);
  color: var(--text, #f2f2f2);
  font-size: 16px;
}

body.rentcontact-miniapp .complaint-topic-label.is-placeholder,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-label.is-placeholder {
  color: var(--hint, #8e8e93);
}

body.rentcontact-miniapp .complaint-topic-chevron,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-chevron {
  color: var(--hint, #8e8e93);
}

body.rentcontact-miniapp .complaint-topic-sheet,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-sheet {
  background: var(--secondary, #2c2c2e);
  color: var(--text, #f2f2f2);
  border-color: transparent;
}

body.rentcontact-miniapp .complaint-topic-sheet-bar,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-sheet-bar {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.rentcontact-miniapp .complaint-topic-sheet-close,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-sheet-close {
  color: var(--hint, #8e8e93);
}

body.rentcontact-miniapp .complaint-topic-option,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-option {
  color: var(--text, #f2f2f2);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.rentcontact-miniapp .complaint-topic-option.selected,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-option.selected {
  color: var(--accent, #2ea6ff);
}

body.rentcontact-miniapp .complaint-topic-option:active,
.complaint-overlay.complaint-overlay--miniapp .complaint-topic-option:active {
  background: rgba(255, 255, 255, 0.06);
}

body.rentcontact-miniapp .complaint-consents,
.complaint-overlay.complaint-overlay--miniapp .complaint-consents {
  color: var(--hint, #8e8e93);
}

body.rentcontact-miniapp .complaint-consents input,
.complaint-overlay.complaint-overlay--miniapp .complaint-consents input {
  accent-color: var(--accent, #2ea6ff);
}

body.rentcontact-miniapp .complaint-consents a,
.complaint-overlay.complaint-overlay--miniapp .complaint-consents a {
  color: var(--accent, #2ea6ff);
}

body.rentcontact-miniapp .complaint-btn-cancel,
.complaint-overlay.complaint-overlay--miniapp .complaint-btn-cancel {
  background: var(--bg, #1a1a1e);
  color: var(--text, #f2f2f2);
  border-radius: var(--radius, 12px);
}

body.rentcontact-miniapp .complaint-btn-submit,
.complaint-overlay.complaint-overlay--miniapp .complaint-btn-submit {
  background: var(--accent, #2ea6ff);
  color: var(--accent-text, #fff);
  border-radius: var(--radius, 12px);
}

body.rentcontact-miniapp .complaint-success .complaint-number,
.complaint-overlay.complaint-overlay--miniapp .complaint-success .complaint-number {
  color: var(--accent, #2ea6ff);
}

body.rentcontact-miniapp .complaint-alert-hint,
.complaint-overlay.complaint-overlay--miniapp .complaint-alert-hint {
  color: var(--text, #f2f2f2);
}

body.rentcontact-miniapp .complaint-alert-hint strong,
.complaint-overlay.complaint-overlay--miniapp .complaint-alert-hint strong {
  color: var(--accent, #2ea6ff);
}
