/* Tagly - Cute soft mint & cream aesthetic, phone-friendly */

:root {
  --bg-gradient: linear-gradient(160deg, #edf7f1 0%, #fdfbf7 50%, #edf5f0 100%);
  --card-bg: #ffffff;
  --text-main: #233a2c;
  --text-muted: #5e7d6b;
  --primary: #3d7955;
  --primary-hover: #326546;
  --primary-soft: #eaf5ee;
  --border-soft: rgba(165, 208, 182, 0.35);
  --shadow-soft: 0 10px 28px rgba(50, 95, 68, 0.06);
  --shadow-sm: 0 4px 14px rgba(50, 95, 68, 0.04);
  --radius-card: 26px;
  --radius-pill: 999px;
  --radius-note: 20px;
  --danger-color: #c94b49;
  --danger-soft: #fdf2f2;
}

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

body {
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.55;
  padding: 20px 14px 70px;
  min-height: 100vh;
}

/* One-column phone-friendly container */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header greeting */
.header {
  text-align: center;
  padding: 8px 10px 2px;
}

.app-title {
  font-family: "Caveat", cursive, system-ui, -apple-system, sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #1a4d2e; /* Deeper soft green to stand out beautifully */
  letter-spacing: 0.5px;
  line-height: 1.1;
  margin-bottom: 2px;
}

.subtitle {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Navigation bubbles row */
.bubbles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 2px 0 6px;
}

.bubble {
  border: 1px solid var(--border-soft);
  background-color: #ffffff;
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.bubble:hover {
  transform: translateY(-1px);
  background-color: #f7fbf8;
}

.bubble.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(61, 121, 85, 0.25);
}

/* Screen views */
.screen-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Home forms wrapper */
.home-forms-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Add another tag section */
.add-tag-section {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 14px;
  box-shadow: var(--shadow-sm);
}

.inline-tag-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* First-use card */
.first-use-card {
  background-color: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.first-use-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.hint-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.first-tag-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

/* Note Composer Card */
.composer-card {
  background-color: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 20px 18px;
  box-shadow: var(--shadow-soft);
}

.composer-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(160, 205, 180, 0.4);
  border-radius: 18px;
  font-size: 0.96rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: #fafdfb;
  resize: vertical;
  min-height: 72px;
  line-height: 1.45;
  outline: none;
  transition: all 0.15s ease;
}

.note-textarea:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 121, 85, 0.1);
}

.note-textarea::placeholder {
  color: #9cb5a5;
  font-weight: 500;
}

/* Tag choice chips */
.composer-tags-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.composer-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tag-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-chip {
  border: 1px solid var(--border-soft);
  background-color: #f7fbf8;
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.tag-chip:hover {
  background-color: #eaf5ee;
}

.tag-chip.selected {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(61, 121, 85, 0.2);
}

/* Composer footer */
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.deadline-control-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-deadline {
  background-color: #f3f8f4;
  color: var(--primary);
  border: 1px solid var(--border-soft);
  font-size: 0.88rem;
  padding: 7px 14px;
  min-height: 38px;
}

.btn-deadline:hover {
  background-color: #e8f4ec;
}

.btn-deadline.has-deadline {
  background-color: #eaf5ee;
  border-color: var(--primary);
  font-weight: 800;
}

.btn-clear-deadline {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.btn-clear-deadline:hover {
  color: var(--danger-color);
}

/* Active tag banner (delete tag control) */
.active-tag-banner {
  background-color: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

.delete-tag-confirm-box {
  background-color: var(--danger-soft);
  border: 1px solid #fadad7;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.delete-tag-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Notes list screen */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual note card */
.note-card {
  background-color: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-note);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.note-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.note-text {
  font-size: 0.98rem;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(165, 208, 182, 0.35);
  padding-top: 8px;
  margin-top: 2px;
}

.note-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.note-tag-badge {
  background-color: var(--primary-soft);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

.note-date {
  font-size: 0.76rem;
  font-weight: 600;
  color: #6a8874;
  letter-spacing: 0.1px;
}

/* Deadline status badges */
.deadline-badge {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.deadline-badge.future {
  background-color: #edf7fe;
  color: #1f6fad;
}

.deadline-badge.today {
  background-color: #fef8e7;
  color: #966708;
}

.deadline-badge.past {
  background-color: #fdf0f0;
  color: #b73838;
}

/* Tap-to-reveal action drawer on note card */
.note-actions-drawer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(165, 208, 182, 0.25);
  margin-top: 4px;
}

.btn-drawer-action {
  padding: 6px 14px;
  font-size: 0.84rem;
  border-radius: var(--radius-pill);
  min-height: 34px;
}

/* In-place note editor */
.note-edit-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Empty states */
.empty-state-card {
  background-color: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--primary);
}

.empty-state-hint {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Inputs & buttons */
.text-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(160, 205, 180, 0.4);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: #ffffff;
  outline: none;
  min-height: 42px;
  transition: all 0.15s ease;
}

.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 121, 85, 0.1);
}

.text-input::placeholder {
  color: #9cb5a5;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  min-height: 42px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-large {
  width: 100%;
  font-size: 1.05rem;
  min-height: 48px;
}

.btn-danger {
  background-color: var(--danger-color);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #aa3e3c;
}

.btn-secondary {
  background-color: #f0f4f1;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover {
  background-color: #e5ece7;
}

.btn-subtle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.btn-subtle:hover {
  color: var(--danger-color);
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}
