/* ==========================================================================
   Notes ABC - FreeNotes Inspired Interactive Studio Theme
   Warm textured paper background, interactive live canvas tablet simulator,
   floating tool dock, pastel feature cards, and handwritten calligraphic accents.
   ========================================================================== */

:root {
  --notes-bg-warm: #faf7f2;
  --notes-bg-card: #ffffff;
  --notes-paper-dot: #cbd5e1;
  --notes-ink-deep: #050038;
  --notes-primary: #4f46e5;
  --notes-primary-light: #e0e7ff;
  --notes-accent-rose: #f43f5e;
  --notes-accent-amber: #f59e0b;
  --notes-accent-sky: #0ea5e9;
  --notes-accent-mint: #10b981;
  --notes-accent-lilac: #a855f7;
  --font-handwriting: 'Caveat', 'Covered By Your Grace', cursive, sans-serif;
  --font-headline: 'Plus Jakarta Sans', 'Outfit', sans-serif;
}

/* FreeNotes Ambient Paper Background */
body.notes-abc-freenotes-theme {
  background-color: var(--notes-bg-warm) !important;
  background-image: 
    radial-gradient(circle, rgba(168, 157, 138, 0.28) 1.2px, transparent 1.2px);
  background-size: 26px 26px !important;
  color: var(--notes-ink-deep) !important;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
}

/* Handwritten Kicker & Badges */
.handwritten-kicker {
  font-family: var(--font-handwriting);
  font-size: 1.55rem;
  color: #e11d48;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: rotate(-1.5deg);
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(225, 29, 72, 0.1);
}

.handwritten-badge-note {
  font-family: var(--font-handwriting);
  font-size: 1.25rem;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(79, 70, 229, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hero Title FreeNotes Style */
.freenotes-hero-title {
  font-family: var(--font-headline);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: #050038;
  letter-spacing: -0.03em;
  margin: 12px 0 16px;
}

.freenotes-hero-title .accent-brush {
  position: relative;
  display: inline-block;
  color: #4338ca;
}

.freenotes-hero-title .accent-brush::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 14px;
  background: rgba(254, 240, 138, 0.7);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-0.5deg);
}

.freenotes-hero-desc {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: #475569;
  max-width: 720px;
  margin: 0 0 28px;
}

/* Interactive Tablet Canvas Showcase Frame */
.freenotes-tablet-frame {
  position: relative;
  background: #1e1b4b;
  border-radius: 28px;
  padding: 14px 14px 18px;
  box-shadow: 
    0 25px 60px -15px rgba(5, 0, 56, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 40px auto;
  max-width: 1020px;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.freenotes-tablet-frame:hover {
  box-shadow: 
    0 32px 70px -18px rgba(5, 0, 56, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* Tablet Camera Notch & Status Bar */
.tablet-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px;
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 600;
}

.tablet-camera-notch {
  width: 10px;
  height: 10px;
  background: #09090b;
  border-radius: 50%;
  border: 1.5px solid #312e81;
}

/* Tablet Screen Screen Area */
.tablet-screen {
  background: #faf8f5;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) inset;
  display: flex;
  flex-direction: column;
}

/* Tablet Top App Bar */
.tablet-app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tablet-notebook-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
}

.tablet-notebook-title i {
  color: #6366f1;
}

/* Canvas Area Container */
.tablet-canvas-viewport {
  position: relative;
  width: 100%;
  min-height: 480px;
  height: 520px;
  touch-action: none; /* Crucial for drawing on mobile / stylus without page scrolling */
  cursor: crosshair;
  background: #faf8f5;
  overflow: hidden;
}

#notesStudioCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Floating Studio Tool Dock (FreeNotes / iPad Apple Pencil dock style) */
.freenotes-tool-dock {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
  z-index: 50;
  max-width: 95%;
  flex-wrap: wrap;
  justify-content: center;
}

.dock-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 12px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.dock-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dock-btn.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.dock-btn.tape-active {
  background: #e11d48;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.dock-separator {
  width: 1px;
  height: 24px;
  background: #cbd5e1;
  margin: 0 2px;
}

/* Color Swatches in Tool Dock */
.dock-color-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.18);
}

.color-dot.active {
  transform: scale(1.22);
  box-shadow: 0 0 0 2px #4f46e5;
}

/* Stroke Width Slider / Indicator */
.stroke-size-selector {
  display: flex;
  align-items: center;
  gap: 5px;
}

.size-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

.size-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Paper Template Switcher Dropdown */
.paper-switcher-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

/* Interactive Recall Feedback Bar */
.recall-feedback-bar {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 8px 18px;
  font-size: 0.84rem;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  transition: background-color 0.3s ease;
}

.recall-feedback-bar.flash {
  background: #f0fdf4;
}

/* FreeNotes Organic Pastel Feature Cards Section */
.freenotes-cards-section {
  background: #ffffff;
  border-radius: 48px;
  padding: clamp(40px, 6vw, 90px) clamp(20px, 4vw, 60px);
  box-shadow: 0 10px 40px rgba(5, 0, 56, 0.05);
  margin: 60px auto 40px;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
}

.freenotes-cards-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(36px, 5vw, 60px);
}

.freenotes-cards-header h2 {
  font-family: var(--font-headline);
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 800;
  color: #050038;
  letter-spacing: -0.02em;
  margin: 10px 0 14px;
}

.freenotes-pastel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.pastel-card {
  border-radius: 32px;
  padding: 34px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.pastel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.pastel-card-num {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 20px;
  font-family: var(--font-headline);
}

.pastel-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #050038;
  margin: 0 0 12px;
  line-height: 1.3;
}

.pastel-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #050038;
  opacity: 0.78;
  margin: 0 0 16px;
}

.pastel-card-tag {
  margin-top: auto;
  font-family: var(--font-handwriting);
  font-size: 1.25rem;
  font-weight: 700;
  color: #050038;
  opacity: 0.85;
}

/* Pastel Variations */
.pastel-pink {
  background: #fee1ff;
}
.pastel-pink .pastel-card-num {
  color: #d946ef;
}

.pastel-yellow {
  background: #fff4dc;
}
.pastel-yellow .pastel-card-num {
  color: #f59e0b;
}

.pastel-sky {
  background: #def6ff;
}
.pastel-sky .pastel-card-num {
  color: #0284c7;
}

.pastel-mint {
  background: #dcfce7;
}
.pastel-mint .pastel-card-num {
  color: #059669;
}

/* Handwriting Testimonial Quotes FreeNotes Style */
.quote-avatar-bubble {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.quote-author-handwritten {
  font-family: var(--font-handwriting);
  font-size: 2rem;
  color: #6366f1;
  font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .freenotes-tablet-frame {
    padding: 8px 8px 12px;
    border-radius: 20px;
  }
  
  .tablet-canvas-viewport {
    height: 420px;
  }

  .freenotes-tool-dock {
    padding: 6px 10px;
    gap: 6px;
    bottom: 12px;
  }

  .dock-btn {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .dock-color-swatches {
    gap: 4px;
  }

  .color-dot {
    width: 18px;
    height: 18px;
  }

  .dock-separator {
    display: none;
  }
}
