/* Note-taking Feature Styles */

.notes-toggle {
  position: fixed;
  bottom: 6rem;
  right: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #76ddff, #5b8aff);
  border: none;
  box-shadow: 0 4px 20px rgba(118, 221, 255, 0.4);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notes-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(118, 221, 255, 0.6);
}

.notes-toggle.has-notes {
  background: linear-gradient(135deg, #00d4aa, #3ed598);
}

.notes-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(90vw, 450px);
  background: #0a0c14;
  border-left: 1px solid rgba(118, 221, 255, 0.3);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-panel.active {
  transform: translateX(0);
}

.notes-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #76ddff, #5b8aff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.notes-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notes-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.notes-close:hover {
  opacity: 1;
}

.notes-info {
  padding: 1rem 1.5rem;
  background: rgba(118, 221, 255, 0.1);
  border-bottom: 1px solid rgba(118, 221, 255, 0.2);
  flex-shrink: 0;
}

.notes-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #b7c2d9;
  line-height: 1.4;
}

.notes-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-editor {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notes-textarea {
  flex: 1;
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #e0e0e0;
  font-size: 0.95rem;
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.notes-textarea:focus {
  border-color: #76ddff;
  background: rgba(255, 255, 255, 0.08);
}

.notes-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.notes-actions {
  display: flex;
  gap: 0.75rem;
}

.notes-btn {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}

.notes-btn-primary {
  background: linear-gradient(135deg, #76ddff, #5b8aff);
  color: #fff;
}

.notes-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b7c2d9;
}

.notes-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(118, 221, 255, 0.3);
}

.notes-btn:active {
  transform: translateY(0);
}

.notes-metadata {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.notes-saved {
  position: fixed;
  bottom: 8rem;
  right: 1.25rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #00d4aa, #3ed598);
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
  z-index: 1002;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.notes-saved.show {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .notes-toggle {
    bottom: 6rem;
    right: 1rem;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .notes-panel {
    width: 100%;
    top: 50vh;
    bottom: 0;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-top: 2px solid rgba(118, 221, 255, 0.3);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
  }

  .notes-saved {
    bottom: 8rem;
    right: 1rem;
  }
}

/* Light theme */
html[data-theme="light"] .notes-panel {
  background: #ffffff;
  border-left-color: rgba(118, 221, 255, 0.2);
}

html[data-theme="light"] .notes-textarea {
  background: #f6f8fc;
  border-color: #d7def0;
  color: #0f1524;
}

html[data-theme="light"] .notes-textarea::placeholder {
  color: rgba(15, 21, 36, 0.4);
}

html[data-theme="light"] .notes-btn-secondary {
  background: #f6f8fc;
  border-color: #d7def0;
  color: #0f1524;
}

html[data-theme="light"] .notes-metadata {
  background: #f6f8fc;
  border-top-color: #d7def0;
  color: rgba(15, 21, 36, 0.5);
}

html[data-theme="light"] .notes-info {
  background: rgba(118, 221, 255, 0.08);
  border-bottom-color: rgba(118, 221, 255, 0.15);
}

html[data-theme="light"] .notes-info p {
  color: #51607a;
}
