/* ==========================================================================
   Blogger Mind Notes System Design Stylesheet (Fixed UI Clipping)
   ========================================================================== */

:root {
  --notes-dark-bg: #0e0e0f;
  --notes-dark-card: #121418;
  --notes-dark-border: #262626;
  --notes-accent: #2563eb;
  --notes-accent-hover: #1d4ed8;
  --notes-danger: #ef4444;
  --notes-text: #eef1f4;
  --notes-muted: #9aa3ad;

  /* Keep Custom Colors Palette */
  --note-color-default: #1e293b;
  --note-color-yellow: #453005;
  --note-color-blue: #0c2d48;
  --note-color-green: #0f3a20;
  --note-color-pink: #421223;
  --note-color-purple: #2d1242;
  --note-color-gray: #2d3748;
}

/* Core Container Style */
.note-app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  color: var(--notes-text);
  font-family: system-ui, -apple-system, Roboto, sans-serif;
}

/* Top bar controls */
.note-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--notes-dark-border);
  padding-bottom: 16px;
}

.note-logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-logo-section h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.note-logo-icon {
  width: 28px;
  height: 28px;
  fill: var(--notes-accent);
}

.note-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 480px;
  min-width: 260px;
}

.note-search-wrapper input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background-color: var(--notes-dark-card);
  border: 1px solid var(--notes-dark-border);
  border-radius: 999px;
  color: var(--notes-text);
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.note-search-wrapper input:focus {
  border-color: var(--notes-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--notes-muted);
  pointer-events: none;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.sync-badge.logged-in {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.sync-badge.guest-mode {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e11;
}

.sync-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Note Creator Layout */
.note-creator-container {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.note-creator-box {
  width: 100%;
  max-width: 540px;
  background-color: var(--notes-dark-card);
  border: 1px solid var(--notes-dark-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Changed from overflow: hidden to allow absolute popovers to extend outward */
  overflow: visible; 
  transition: box-shadow 0.2s, border-color 0.2s;
}

.note-creator-box:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.creator-collapsed-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  cursor: text;
}

.creator-collapsed-trigger span {
  color: var(--notes-muted);
  font-size: 15px;
}

.creator-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--notes-muted);
}

.creator-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--notes-text);
}

.creator-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.creator-expanded-content {
  padding: 16px 18px;
}

.creator-title-input,
.creator-body-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--notes-text);
  outline: none;
  padding: 0;
  margin-bottom: 12px;
}

.creator-title-input {
  font-size: 16px;
  font-weight: 600;
}

.creator-body-input {
  font-size: 14px;
  resize: none;
  line-height: 1.5;
}

.creator-stats-bar {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--notes-muted);
  margin-bottom: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 8px;
}

.creator-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-palette {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--notes-muted);
  transition: background-color 0.2s, color 0.2s;
}

.tool-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--notes-text);
}

.tool-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.tool-btn.active-pinned {
  color: #3b82f6;
}

/* Fixed Color Dropdown Style */
.color-picker-wrap {
  position: relative;
}

.color-dropdown {
  position: absolute;
  bottom: 100%; /* Displays the palette above the button to bypass bottom container boundaries */
  left: 50%;
  transform: translateX(-50%);
  background-color: #1a1d24;
  border: 1px solid var(--notes-dark-border);
  border-radius: 20px; /* Modern pill shape */
  padding: 6px 10px;
  display: none;
  flex-direction: row; /* Horizontal alignment */
  gap: 8px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px; /* Offset spacing */
}

.color-dropdown.show {
  display: flex; /* Activated flex orientation */
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.1s;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: var(--notes-text);
}

.creator-control-buttons {
  display: flex;
  gap: 8px;
}

/* Base button structures */
.btn {
  background-color: var(--notes-accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--notes-accent-hover);
}

.btn.alt {
  background-color: transparent;
  border: 1px solid var(--notes-dark-border);
  color: var(--notes-muted);
}

.btn.alt:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--notes-text);
}

/* View Switch Filters */
.notes-nav-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--notes-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s, color 0.2s;
}

.filter-btn:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--notes-text);
}

.filter-btn.active {
  background-color: rgba(37, 99, 235, 0.12);
  color: #3b82f6;
}

.filter-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Notes Grid Styles */
.grid-section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--notes-muted);
  letter-spacing: 0.1em;
  margin: 24px 0 12px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* Card Style */
.note-card {
  border-radius: 10px;
  border: 1px solid var(--notes-dark-border);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  padding-right: 24px;
  word-break: break-word;
}

.card-body {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  flex: 1;
}

.card-pin-indicator {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #3b82f6;
}

.card-pin-indicator svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 11px;
  color: var(--notes-muted);
}

/* Modal Window Style */
.note-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.note-modal-card {
  width: 100%;
  max-width: 560px;
  background-color: var(--notes-dark-card);
  border: 1px solid var(--notes-dark-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-title-input {
  background: transparent;
  border: none;
  color: var(--notes-text);
  font-size: 18px;
  font-weight: 600;
  outline: none;
  flex: 1;
}

.modal-body-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--notes-text);
  font-size: 14.5px;
  resize: none;
  outline: none;
  line-height: 1.5;
}

.modal-footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--notes-muted);
  margin: 16px 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

.save-indicator {
  color: #10b981;
  font-weight: 600;
}

.modal-counts {
  display: flex;
  gap: 12px;
}

.modal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-btn.danger:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--notes-danger);
}

/* Color Mapped Cards */
.note-color-default { background-color: var(--note-color-default); }
.note-color-yellow { background-color: var(--note-color-yellow); }
.note-color-blue { background-color: var(--note-color-blue); }
.note-color-green { background-color: var(--note-color-green); }
.note-color-pink { background-color: var(--note-color-pink); }
.note-color-purple { background-color: var(--note-color-purple); }
.note-color-gray { background-color: var(--note-color-gray); }

/* Static Loading Indicator */
.notes-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--notes-muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--notes-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State Styles */
.notes-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--notes-muted);
}

.notes-empty-state svg {
  width: 48px;
  height: 48px;
  fill: rgba(255, 255, 255, 0.15);
  margin-bottom: 12px;
}

.notes-empty-state p {
  font-size: 14px;
}

/* Landing Page Informative Elements */
.notes-seo-section {
  margin-top: 64px;
  border-top: 1px solid var(--notes-dark-border);
  padding-top: 48px;
}

.notes-seo-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.notes-seo-section > p {
  color: var(--notes-muted);
  font-size: 15px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.seo-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.seo-benefit-card {
  background-color: var(--notes-dark-card);
  border: 1px solid var(--notes-dark-border);
  padding: 20px;
  border-radius: 10px;
}

.seo-benefit-card h3 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 10px;
}

.seo-benefit-card p {
  color: var(--notes-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.seo-faq-block {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 24px;
}

.faq-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.faq-item p {
  color: var(--notes-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .note-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .note-logo-section {
    justify-content: center;
  }
  .note-search-wrapper {
    max-width: 100%;
  }
}