/* Bottom Sheet / Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

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

/* Bottom Sheet Container */
.bottom-sheet {
  position: fixed;
  bottom: -100%; /* Hidden by default */
  left: 0;
  width: 100%;
  height: 65vh;
  background-color: #1a1a1a;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 1001;
  transition: bottom 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.bottom-sheet.active {
  bottom: 0;
}

/* Sheet Header */
.sheet-header {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
  font-weight: bold;
}

.sheet-close {
  position: absolute;
  right: 20px;
  top: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
}

/* Comments Area */
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.comment-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #333;
}

.comment-content h4 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.comment-content p {
  font-size: 0.95rem;
}

/* Comment Input Area */
.comment-input-area {
  padding: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 10px;
}

.comment-input-area input {
  flex: 1;
  background-color: #2a2a2a;
  border: none;
  border-radius: 20px;
  padding: 10px 15px;
  color: white;
  outline: none;
}

.comment-input-area button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0 20px;
  font-weight: bold;
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: rgba(255,255,255,0.9);
  color: #000;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Share Sheet */
#share-sheet {
  height: auto;
  min-height: 200px;
  max-height: 45vh;
}

.share-options {
  display: flex;
  flex-direction: column;
  padding: 10px 0 20px;
}

.share-option {
  padding: 16px 24px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.share-option:active {
  background: rgba(255,255,255,0.08);
}

/* Comment avatar initial letter */
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.comment-content small {
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: block;
  margin-top: 3px;
}

/* New comment entrance animation */
.new-comment {
  animation: slideIn 0.3s ease;
}

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

.loading-comments, .empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Pause overlay */
.pause-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 15;
}

.pause-overlay.visible {
  opacity: 0.85;
  animation: fadeOut 0.6s forwards 0.3s;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* Light mode overrides */
:root.light-mode .bottom-sheet {
  background-color: #f8f8f8;
  color: #000;
}

:root.light-mode .share-option {
  border-color: rgba(0,0,0,0.07);
}

:root.light-mode .comment-input-area input {
  background: #eee;
  color: #000;
}

:root.light-mode .toast {
  background: rgba(0,0,0,0.8);
  color: #fff;
}
