/* ========================================
   Кнопка открытия политики
   ======================================== */
.policy-trigger {
  font-size: 14px;
  color: #f6f7f9b2;
  text-decoration: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  transition: color 0.3s ease;
  font-family: inherit;
}

/*.policy-trigger:hover {*/
/*  color: #333;*/
/*}*/

/*.policy-trigger:focus {*/
/*  outline: 2px solid #4A90E2;*/
/*  outline-offset: 2px;*/
/*  border-radius: 2px;*/
/*}*/

/* ========================================
   Модальное окно
   ======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

/* Шапка модального окна */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  color: #9ca3af;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #4b5563;
  background-color: #f3f4f6;
}

/*.modal-close:focus {*/
/*  outline: 2px solid #4A90E2;*/
/*  outline-offset: 2px;*/
/*}*/

/* Контент модального окна */
.modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  color: #374151;
  line-height: 1.8;
}

.modal-content h2 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #1f2937;
  font-size: 1.5em;
}

.modal-content h3 {
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  color: #1f2937;
  font-size: 1.2em;
}

.modal-content p {
  margin-bottom: 1em;
}

.modal-content ul,
.modal-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.modal-content li {
  margin-bottom: 0.5em;
}

/* Футер модального окна */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.modal-btn {
  background-color: #3c83f6;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.modal-btn:hover {
  background-color: #357ABD;
}

.modal-btn:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

/* Скроллбар */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ========================================
   Адаптивность
   ======================================== */
@media (max-width: 768px) {
  .modal {
    max-width: 90%;
    max-height: 85vh;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-footer {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 10px;
  }

  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-close {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }

  .modal-content {
    padding: 16px;
    font-size: 14px;
  }

  .modal-footer {
    padding: 12px 16px;
  }

  .modal-btn {
    width: 100%;
    padding: 12px 24px;
  }
}