/*
 * styles.css — Complete stylesheet for StickyWall vanilla JS app.
 *
 * Combines all three Angular CSS sources into a single file:
 *   1. Global styles      (app/src/styles.css)
 *   2. Wall component      (wall.component.css)
 *   3. Sticky-note component (sticky-note.component.css)
 *
 * Every value is ported 1:1 from the Angular version — same colours, sizes,
 * shadows, transitions, fonts, and background pattern.
 */

/* ========================================================================
   1. GLOBAL RESET & BASE
   ======================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Content pages (about, privacy, terms) need scrolling */
html:has(.seo-content),
html:has(.seo-content) body {
  height: auto;
  overflow: auto;
}

/* ========================================================================
   2. WALL (full-viewport container with dot-grid background)
   ======================================================================== */

.wall {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #f0f0f0;
  background-image: radial-gradient(circle, #d0d0d0 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ========================================================================
   3. TOOLBAR (fixed header bar)
   ======================================================================== */

.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100000;
}

.app-title {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  letter-spacing: -0.3px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.about-link {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  transition: color 0.15s ease;
}

.about-link:hover {
  color: #333;
}

.add-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: #333;
  color: #fff;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.add-btn:hover {
  background: #555;
}

.add-btn:active {
  transform: scale(0.97);
}

/* ========================================================================
   4. EMPTY STATE
   ======================================================================== */

.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #999;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  user-select: none;
}

/* ========================================================================
   5. STICKY NOTE
   ======================================================================== */

.sticky-note {
  position: absolute;
  width: 220px;
  min-height: 200px;
  padding: 0;
  border-radius: 4px;
  box-shadow:
    2px 4px 12px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: grab;
  user-select: none;
  display: flex;
  flex-direction: column;
  touch-action: none;
  transition: box-shadow 0.15s ease;
}

.sticky-note:hover {
  box-shadow:
    3px 6px 18px rgba(0, 0, 0, 0.2),
    0 2px 5px rgba(0, 0, 0, 0.12);
}

.sticky-note.dragging {
  cursor: grabbing;
  box-shadow:
    6px 10px 24px rgba(0, 0, 0, 0.25),
    0 3px 8px rgba(0, 0, 0, 0.15);
  opacity: 0.92;
}

/* Folded corner effect (top-right) */
.sticky-note::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 28px 28px 0;
  border-color: transparent rgba(0, 0, 0, 0.06) transparent transparent;
  border-radius: 0 4px 0 0;
  pointer-events: none;
}

/* ========================================================================
   6. NOTE HEADER & DELETE BUTTON
   ======================================================================== */

.note-header {
  display: flex;
  justify-content: flex-end;
  padding: 4px 6px 0 6px;
  min-height: 24px;
}

.delete-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: rgba(0, 0, 0, 0.3);
  font-size: 18px;
  line-height: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}

.delete-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.6);
}

/* ========================================================================
   7. NOTE BODY, TEXT DISPLAY & TEXTAREA
   ======================================================================== */

.note-body {
  flex: 1;
  padding: 4px 12px 12px 12px;
  min-height: 140px;
}

.note-text {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-text.placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-style: italic;
}

.note-textarea {
  width: 100%;
  height: 140px;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  resize: none;
  padding: 0;
  cursor: text;
}

.note-textarea::placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-style: italic;
}

/* ========================================================================
   8. ABOUT PAGE NAV
   ======================================================================== */

.about-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.about-nav-back {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  transition: color 0.15s ease;
}

.about-nav-back:hover {
  color: #333;
}

/* ========================================================================
   9. SEO CONTENT
   ======================================================================== */

.seo-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  color: #444;
  line-height: 1.7;
}

.seo-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
}

.seo-content h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-top: 40px;
  margin-bottom: 12px;
}

.seo-content p {
  font-size: 16px;
  margin-bottom: 16px;
}

.seo-content ul {
  margin: 0 0 16px 20px;
  font-size: 16px;
}

.seo-content li {
  margin-bottom: 6px;
}

.seo-content footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
  font-size: 14px;
  color: #999;
}
