/* ============================================================
   Memory Verses Styles
   Matches the main NT-theology aesthetic (Cinzel/Cormorant/EB Garamond)
   ============================================================ */

.memory-verses-app {
  margin: 30px 0 50px;
}

.memory-verses-app .mv-app {
  background: linear-gradient(135deg, rgba(244, 234, 213, 0.55), rgba(232, 220, 192, 0.55));
  border: 1px solid var(--gold);
  padding: 24px 24px 32px;
}

/* ---- Header ---- */
.mv-header {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed rgba(184, 134, 11, 0.4);
}

.mv-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mv-filter-label {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.mv-filter-select {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  padding: 7px 14px;
  background: rgba(255, 250, 235, 0.85);
  border: 1px solid var(--gold);
  color: var(--ink);
  cursor: pointer;
  min-width: 220px;
}

.mv-filter-select:hover { border-color: var(--crimson); }

/* ---- Stats row ---- */
.mv-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
}

.mv-stat {
  flex: 1 1 100px;
  min-width: 88px;
  padding: 10px 8px;
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid rgba(184, 134, 11, 0.35);
  text-align: center;
}

.mv-stat-num {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.mv-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--sepia);
  text-transform: uppercase;
  margin-top: 4px;
}

.mv-stat-unseen .mv-stat-num    { color: #6a6a6a; }
.mv-stat-learning .mv-stat-num  { color: #b87333; }
.mv-stat-familiar .mv-stat-num  { color: #2c7a4a; }
.mv-stat-mastered .mv-stat-num  { color: #1f5f8b; }
.mv-stat-due .mv-stat-num       { color: var(--crimson); }

.mv-stat-due { border-color: rgba(139, 26, 26, 0.4); background: rgba(255, 240, 235, 0.65); }

/* ---- Tabs ---- */
.mv-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.mv-tab-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  background: transparent;
  border: none;
  color: var(--sepia);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.mv-tab-btn:hover { color: var(--crimson); }

.mv-tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* ---- Card ---- */
.mv-card {
  background: rgba(255, 250, 235, 0.85);
  border: 1px solid var(--gold);
  padding: 36px 36px 28px;
  position: relative;
}

.mv-card-ref {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--crimson);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.mv-card-cat {
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  color: var(--gold-deep);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 22px;
}

.mv-card-text {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink);
  text-align: center;
  padding: 18px 14px 22px;
  margin: 0 auto;
  max-width: 640px;
  font-style: italic;
}

.mv-card-firstletter {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  font-style: normal;
  color: var(--gold-deep);
  word-spacing: 0.4em;
  line-height: 1.85;
}

.mv-card-hidden {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--sepia);
  opacity: 0.7;
}

.mv-card-note {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--sepia);
  text-align: center;
  padding: 14px 28px 0;
  margin: 0 auto;
  max-width: 580px;
  border-top: 1px dashed rgba(184, 134, 11, 0.35);
  margin-top: 20px;
}

.mv-card-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.mv-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 26px;
  background: rgba(255, 250, 235, 0.9);
  border: 1px solid var(--gold);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s;
  font-weight: 500;
}

.mv-btn:hover {
  background: rgba(255, 250, 235, 1);
  transform: translateY(-1px);
}

.mv-btn-secondary {
  background: rgba(255, 250, 235, 0.6);
  color: var(--gold-deep);
}

.mv-btn-secondary:hover {
  background: rgba(255, 250, 235, 0.95);
  border-color: var(--crimson);
  color: var(--crimson);
}

.mv-btn-review {
  border-color: rgba(139, 26, 26, 0.45);
  color: var(--crimson);
}

.mv-btn-review:hover {
  background: rgba(255, 240, 235, 0.95);
  border-color: var(--crimson);
}

.mv-btn-knew {
  border-color: rgba(44, 122, 74, 0.5);
  color: #2c7a4a;
  background: rgba(240, 250, 240, 0.7);
}

.mv-btn-knew:hover {
  background: rgba(220, 245, 220, 0.95);
  border-color: #2c7a4a;
}

.mv-skip-row {
  text-align: center;
  margin-top: 18px;
}

.mv-skip-btn {
  background: transparent;
  border: none;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--sepia);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(184, 134, 11, 0.4);
  text-decoration-style: dashed;
  text-underline-offset: 4px;
}

.mv-skip-btn:hover { color: var(--crimson); }

/* ---- List view ---- */
.mv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mv-list-row {
  background: rgba(255, 250, 235, 0.85);
  border: 1px solid rgba(184, 134, 11, 0.4);
  padding: 16px 22px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px 18px;
  align-items: baseline;
}

.mv-list-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--crimson);
  font-weight: 600;
  text-transform: uppercase;
}

.mv-list-text {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  font-style: italic;
}

.mv-list-tagwrap {
  grid-column: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.mv-list-cat {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid rgba(184, 134, 11, 0.4);
  background: rgba(255, 250, 235, 0.6);
}

.mv-list-level {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid currentColor;
  opacity: 0.8;
}

.mv-list-level.mv-stat-unseen    { color: #6a6a6a; }
.mv-list-level.mv-stat-learning  { color: #b87333; }
.mv-list-level.mv-stat-familiar  { color: #2c7a4a; }
.mv-list-level.mv-stat-mastered  { color: #1f5f8b; }

.mv-list-note {
  grid-column: 2;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--sepia);
  margin-top: 6px;
}

.mv-reset-wrap {
  text-align: center;
  margin-top: 24px;
}

.mv-empty {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
  color: var(--sepia);
}

.mv-error {
  font-family: 'Cormorant Garamond', serif;
  text-align: center;
  padding: 30px 20px;
  color: var(--crimson);
}

/* ---- Mobile ---- */
@media (max-width: 700px) {
  .memory-verses-app .mv-app { padding: 18px 14px 24px; }
  .mv-card { padding: 24px 18px 22px; }
  .mv-card-ref { font-size: 1.1rem; }
  .mv-card-text { font-size: 1.08rem; padding: 14px 6px 18px; }
  .mv-stat { flex-basis: 70px; min-width: 70px; padding: 8px 4px; }
  .mv-stat-num { font-size: 1.15rem; }
  .mv-stat-label { font-size: 0.55rem; letter-spacing: 0.15em; }
  .mv-tab-btn { padding: 10px 12px; font-size: 0.7rem; }
  .mv-list-row { grid-template-columns: 1fr; gap: 6px; }
  .mv-list-tagwrap { grid-column: 1; }
  .mv-list-note { grid-column: 1; }
}

/* ---- Dark theme adjustments ---- */
[data-theme="dark"] .memory-verses-app .mv-app {
  background: linear-gradient(135deg, rgba(40, 35, 28, 0.6), rgba(35, 30, 25, 0.6));
}
[data-theme="dark"] .mv-card { background: rgba(35, 30, 25, 0.75); }
[data-theme="dark"] .mv-stat { background: rgba(35, 30, 25, 0.6); }
[data-theme="dark"] .mv-list-row { background: rgba(35, 30, 25, 0.65); }
[data-theme="dark"] .mv-filter-select { background: rgba(35, 30, 25, 0.85); color: var(--text); }
[data-theme="dark"] .mv-btn { background: rgba(35, 30, 25, 0.85); color: var(--text); }
[data-theme="dark"] .mv-btn-knew { background: rgba(30, 50, 35, 0.6); }

/* ============================================================
   v2 additions: actions row, modal, forms, pack cards
   ============================================================ */

/* Actions row */
.mv-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(184, 134, 11, 0.3);
}

.mv-action-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 9px 18px;
  background: rgba(255, 250, 235, 0.85);
  border: 1px solid rgba(184, 134, 11, 0.5);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.mv-action-btn:hover {
  background: rgba(255, 250, 235, 1);
  border-color: var(--gold);
  color: var(--crimson);
}

.mv-action-add {
  background: rgba(240, 250, 240, 0.7);
  border-color: rgba(44, 122, 74, 0.4);
  color: #2c7a4a;
  font-weight: 600;
}

.mv-action-add:hover {
  background: rgba(220, 245, 220, 0.95);
  border-color: #2c7a4a;
}

.mv-stat-needtext .mv-stat-num { color: #b87333; }
.mv-stat-needtext { border-color: rgba(184, 115, 51, 0.4); }

/* Edit button on cards */
.mv-card { position: relative; }

.mv-card-edit-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid rgba(184, 134, 11, 0.3);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--sepia);
  padding: 4px 10px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
}

.mv-card-edit-btn:hover {
  color: var(--crimson);
  border-color: var(--gold);
}

/* Needs-text style */
.mv-card-needs-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--sepia);
  opacity: 0.75;
  font-size: 1.05rem;
}

.mv-list-needs-text {
  border-style: dashed !important;
  background: rgba(255, 245, 220, 0.5) !important;
}

.mv-list-needs-text .mv-list-text {
  color: var(--sepia);
  opacity: 0.8;
  font-style: italic;
}

/* Empty state */
.mv-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 250, 235, 0.6);
  border: 1px dashed rgba(184, 134, 11, 0.4);
}

.mv-empty-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 14px;
}

.mv-empty-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sepia);
  max-width: 480px;
  margin: 0 auto 22px;
  line-height: 1.55;
}

.mv-empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Modal */
.mv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.mv-modal {
  background: linear-gradient(180deg, #f8f0e0 0%, #f3e8d0 100%);
  border: 1px solid var(--gold);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 50px rgba(60, 40, 20, 0.4);
}

.mv-modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mv-modal-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-transform: uppercase;
  font-weight: 600;
}

.mv-modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--sepia);
  cursor: pointer;
  padding: 0 6px;
}

.mv-modal-close:hover { color: var(--crimson); }

.mv-modal-content {
  padding: 22px 28px 26px;
  overflow-y: auto;
  flex: 1;
}

.mv-modal-intro {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--sepia);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 20px;
}

/* Form */
.mv-form { display: flex; flex-direction: column; gap: 16px; }

.mv-form-row { display: flex; flex-direction: column; gap: 6px; }

.mv-form-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.mv-form-hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--sepia);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 8px;
}

.mv-form-input {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  padding: 9px 12px;
  background: rgba(255, 250, 240, 0.95);
  border: 1px solid rgba(184, 134, 11, 0.5);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.mv-form-input:focus { border-color: var(--gold); }

.mv-form-input:disabled {
  background: rgba(220, 210, 195, 0.5);
  color: var(--sepia);
  cursor: not-allowed;
}

.mv-form-textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.mv-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Pack cards */
.mv-pack-card {
  background: rgba(255, 250, 235, 0.85);
  border: 1px solid rgba(184, 134, 11, 0.45);
  padding: 18px 22px;
  margin-bottom: 14px;
}

.mv-pack-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.mv-pack-name {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-weight: 600;
}

.mv-pack-count {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid rgba(184, 134, 11, 0.35);
}

.mv-pack-desc {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.mv-pack-meta { margin-bottom: 8px; }

.mv-pack-status {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.mv-pack-citation {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.86rem;
  color: var(--sepia);
  opacity: 0.8;
  margin: 8px 0 12px;
}

.mv-pack-card .mv-btn { width: 100%; }

.mv-pack-card .mv-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mv-pack-starter {
  background: linear-gradient(135deg, rgba(244, 234, 213, 0.9), rgba(232, 220, 192, 0.9));
  border-color: var(--gold);
  border-width: 2px;
  margin-top: 22px;
}

.mv-danger-zone {
  border-top: 1px dashed rgba(139, 26, 26, 0.4);
  padding-top: 18px;
  margin-top: 8px;
}

.mv-danger-zone .mv-form-label { color: var(--crimson); }

/* Mobile modal */
@media (max-width: 700px) {
  .mv-modal-backdrop { padding: 0; align-items: flex-start; }
  .mv-modal { max-height: 100vh; border-left: none; border-right: none; border-top: none; }
  .mv-modal-header { padding: 16px 18px; }
  .mv-modal-content { padding: 18px; }
  .mv-actions-row { gap: 6px; }
  .mv-action-btn { font-size: 0.66rem; padding: 7px 10px; flex: 1; min-width: 90px; }
  .mv-card-edit-btn { top: 8px; right: 8px; font-size: 0.62rem; padding: 3px 7px; }
  .mv-pack-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

[data-theme="dark"] .mv-modal { background: linear-gradient(180deg, #2a2520 0%, #322a22 100%); }
[data-theme="dark"] .mv-empty-state { background: rgba(35, 30, 25, 0.5); }
[data-theme="dark"] .mv-pack-card { background: rgba(35, 30, 25, 0.75); }
[data-theme="dark"] .mv-form-input { background: rgba(35, 30, 25, 0.85); color: var(--text); }
[data-theme="dark"] .mv-action-btn { background: rgba(35, 30, 25, 0.75); color: var(--text); }
