:root {
  --accent: #007021;
  --accent-hover: #009b2a;
  --radius: 12px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Roboto, sans-serif;
/*  background: #f5f5f5;*/
}

.tg-open {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: white;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.tg-open:hover {
  background: var(--accent-hover);
}

/* Модальное окно */
.tg-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.tg-modal[aria-hidden="false"] {
  display: flex !important;
}

.tg-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.25s ease;
  position: relative;
}

.tg-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: #666;
}

.tg-close:hover {
  color: #000;
}

#tgForm label {
  display: block;
  margin: 10px 0 6px;
}

#tgForm input,
#tgForm textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

#tgForm button {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

#tgForm button:hover {
  background: var(--accent-hover);
}

#tgStatus {
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .tg-modal-content {
    width: 94%;
    max-width: none;
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .tg-modal-content {
    width: 94%;
    max-width: none;
    margin: 20% auto;
    padding: 16px;
    border-radius: 12px;
  }

  #tgForm input,
  #tgForm textarea {
    font-size: 16px;
    padding: 10px;
  }

  #tgForm button {
    width: 100%;
    font-size: 18px;
    padding: 12px;
    border-radius: 10px;
  }

  .tg-close {
    top: 8px;
    right: 12px;
    font-size: 24px;
  }
}

/*THEME*/
/* Светлая тема */
.order-light .tg-modal-content {
  background: #ffffff;
  color: #222;
}

/* Тёмная тема */
.order-dark .tg-modal-content {
  background: #2b2b31;
  color: #f0f0f0;
}
