/**
 * Post Bottom Sheet Styles
 * Modern bottom sheet menu for post actions
 */

/* Prevent body scroll when bottom sheet is open */
body.post-bottom-sheet-open {
  overflow: hidden;
}

/* Bottom Sheet Container */

.post-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.post-bottom-sheet__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-bottom-sheet.active .post-bottom-sheet__backdrop {
  opacity: 1;
}

.post-bottom-sheet__content {
  position: relative;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: none;
}

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

.post-bottom-sheet__handle {
  width: 40px;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  margin: 12px auto 8px;
}

.post-bottom-sheet__items {
  padding: 8px 0 max(env(safe-area-inset-bottom), 16px);
}

/* Group Container */
.bottom-sheet-group {
  margin-bottom: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bottom-sheet-group:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

/* Bottom Sheet Items */
.bottom-sheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  margin: 0 12px;
  border-radius: 8px;
  color: #000000;
  text-decoration: none;
  transition: background-color 0.2s ease;
  cursor: pointer;
  min-height: 52px;
}

.bottom-sheet-item:last-child {
  border-bottom: none;
}

.bottom-sheet-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: #000000;
  text-decoration: none;
}

.bottom-sheet-item:active {
  background-color: rgba(0, 0, 0, 0.08);
}

.bottom-sheet-item__text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: inherit;
}

.bottom-sheet-item__icon {
  flex-shrink: 0;
  margin-left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.bottom-sheet-item__icon svg {
  width: 24px;
  height: 24px;
}

.bottom-sheet-item--danger {
  color: #dc3545;
}

.bottom-sheet-item--danger:hover {
  background-color: rgba(220, 53, 69, 0.05);
  color: #dc3545;
}

.bottom-sheet-item--danger:active {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Dark mode support */
body[data-bg="dark"] .post-bottom-sheet__content {
  background: #000000;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
}

body[data-bg="dark"] .post-bottom-sheet__handle {
  background-color: rgba(255, 255, 255, 0.3);
}

body[data-bg="dark"] .bottom-sheet-group {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body[data-bg="dark"] .bottom-sheet-item {
  color: #ffffff;
}

body[data-bg="dark"] .bottom-sheet-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

body[data-bg="dark"] .bottom-sheet-item:active {
  background-color: rgba(255, 255, 255, 0.1);
}

body[data-bg="dark"] .bottom-sheet-item--danger {
  color: #ff6b6b;
}

body[data-bg="dark"] .bottom-sheet-item--danger:hover {
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
}

/* Disable body scroll when sheet is open */
body.post-bottom-sheet-open {
  overflow: hidden;
}

/* Desktop - show as modal in center */
@media (min-width: 768px) {
  .post-bottom-sheet__content {
    max-width: 500px;
    margin: 0 auto;
    border-radius: 20px;
    margin-top: 10vh;
    transform: translateY(100vh);
  }
  
  .post-bottom-sheet.active .post-bottom-sheet__content {
    transform: translateY(0);
  }
}

/* Smooth scrolling for bottom sheet content */
.post-bottom-sheet__content {
  -webkit-overflow-scrolling: touch;
}
