.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  margin: 0 auto;
  padding: 20px 10px 20px 20px;
  position: relative;
  background: #f8f8f8;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
   box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header-container {
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 2px solid #f1f1f1;
}

.modal-header {
  color: #173272;
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.modal-subheader {
  color: #475569;
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.5;
}

.modal-scrollable-content {
  overflow-y: auto;
  flex: 1;
  padding-right: 10px; /* Чтобы компенсировать скроллбар */
  margin-right: -5px; /* Придвигаем скроллбар ближе к краю */  
}

.modal-info h4 {
  margin-block: 12px 4px;
  color: #254798;
  font-weight: 600;
  font-size: clamp(12px, 5vw, 14px);
  letter-spacing: -0.01em;
}


.modal-info ul,
.modal-info p {
  font-size: clamp(10px, 5vw, 13px);
  color: #334155;
  line-height: 1.3;
  padding: 0;
  list-style: none;
}

.modal-info p {
  margin: 0 0 2px 0;
}

.modal-info ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
}

.modal-info ul li::before {
  content: "•";
  position: absolute;
  left: 8px;
  line-height: 0.9;
  color: #334155;
  font-weight: bold;
  font-size: 1.2em;
}




@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}





/* Стилизация скроллбара */
.modal-scrollable-content::-webkit-scrollbar {
  width: 6px;
}

.modal-scrollable-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 12px;
}

.modal-scrollable-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.modal-scrollable-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}



@media (max-width: 640px) {
  /* .modal-overlay {
    padding: 0;
    align-items:flex-end;
  } */
  
  .modal-content {
    /* border-radius: 20px 20px 0 0; */
    max-height: calc(100vh - 16px);
    animation: slideUpMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  
  @keyframes slideUpMobile {
    from {
      opacity: 0;
      transform: translateY(50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}





.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  z-index: 10;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: rgba(248, 248, 248, 0.9);
  backdrop-filter: blur(2px);
  border: 1.5px solid #e9e9e9;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: #64748b;
}

.close-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.close-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.close-btn:active {
  transform: rotate(90deg) scale(0.95);
}