.bottom-sheet {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-sheet.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
}

.sheet-content {
  position: relative;
  background: var(--bg-color);
  border: 1px solid var(--glass-border);
  box-sizing: border-box;
  z-index: 1;
  transform: translateY(100%) translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.sheet-content p {
  font-size: 0.9rem;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  margin-left: auto;
  color: var(--text-main);
}

.sheet-body div {
  padding-bottom: 1rem;
}


@media (max-width: 767px) {
  .bottom-sheet {
    flex-direction: column;
    justify-content: flex-end;
  }

  .sheet-content {
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px 20px 20px;
    overflow: hidden;
    will-change: transform;
    transform: translateY(100%) translateZ(0);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .drag-handle {
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Выезжает, только когда родитель активен */
  .bottom-sheet.active .sheet-content {
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .bottom-sheet {
    align-items: center;
    justify-content: center;
  }

  .sheet-content {
    width: 100%;
    max-width: 750px;
    max-height: 80vh;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
  }

  .drag-handle {
    display: none;
  }

  .bottom-sheet.active .sheet-content {
    transform: translateY(0);
  }
}