/* Draggable Sheet Component Styles */

/* Main Container */
.draggable-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: row;
}

/* Drag Handle */
.sheet-handle {
  width: 40px;
  height: 100%;
  padding: 15px 0 0;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  background: #f8f9fa;
  touch-action: none;
  flex-shrink: 0;
  order: -1;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  border-left: 1px solid #e9ecef;
}

/* Toggle Button */
.sheet-toggle-button {
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1;
  padding: 0;
  color: white;
}

/* Close state (expanded sheet) */
.sheet-toggle-button.close-state {
  background: #dc3545;
}

.sheet-toggle-button.close-state:hover {
  background: #c82333;
}

/* Expand state (collapsed sheet) */
.sheet-toggle-button.expand-state {
  background: #28a745;
}

.sheet-toggle-button.expand-state:hover {
  background: #218838;
}

.sheet-toggle-button:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.sheet-toggle-button:active {
  transform: scale(0.95);
}

.handle-icon {
  font-size: 16px;
  color: #555;
  transition: transform 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.handle-icon:before {
  content: "⋮";
  display: inline-block;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  transform: rotate(0);
}

/* Collapsed State */
.draggable-sheet.collapsed .sheet-content {
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

/* Dragging State */
body.sheet-dragging {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: ew-resize !important;
}

body.sheet-dragging * {
  cursor: ew-resize !important;
}

/* Content Area */
.sheet-content {
  padding: 15px 25px 25px;
  flex-grow: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.6;
  color: #333;
}

/* YouTube Embed Styling */
.sheet-content .youtube-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  margin-bottom: 1em;
  border-radius: 6px;
}

.sheet-content .youtube-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Typography Styles */
.sheet-content h1,
.sheet-content h2,
.sheet-content h3,
.sheet-content h4,
.sheet-content h5,
.sheet-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a1a;
}

.sheet-content h1 {
  font-size: 1.8em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3em;
}

.sheet-content h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #f2f2f2;
  padding-bottom: 0.2em;
}

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

/* List Styles */
.sheet-content ul,
.sheet-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.sheet-content li {
  margin-bottom: 0.4em;
}

/* Text Formatting */
.sheet-content strong {
  font-weight: 700;
}

.sheet-content em {
  font-style: italic;
}

/* Link Styles */
.sheet-content a {
  color: #007bff;
  text-decoration: none;
}

.sheet-content a:hover {
  text-decoration: underline;
}

/* Code Styling */
.sheet-content code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.875em;
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: #c7254e;
}

.sheet-content pre {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1em;
  font-size: 0.9em;
}

.sheet-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 1em;
}

/* Media Styles */
.sheet-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1em;
}

/* Quote Styles */
.sheet-content blockquote {
  margin: 0 0 1em;
  padding: 0.5em 1em;
  border-left: 4px solid #ccc;
  background-color: #f9f9f9;
  color: #555;
}

/* Divider */
.sheet-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 2em 0;
}