/* ========================================
   LEASEPARSER CUSTOM STYLES
   Edit this file to customize the look and feel
   ======================================== */

/* ---------- ATTENTION ANIMATIONS ---------- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}
.animate-shake { animation: shake 0.6s ease-in-out 3; }

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-4px); opacity: 0.7; }
}
.animate-bounce-arrow { animation: bounce-arrow 0.8s ease-in-out 5; }

/* ---------- COLOR TOKENS ---------- */
:root {
  /* Background Colors */
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e5e7eb;

  /* Text Colors */
  --text: #0f172a;
  --muted: #6b7280;

  /* Brand Colors */
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
}

/* Dark Mode Colors */
.dark {
  --bg: #0b1220;
  --card: #0f172a;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #3b82f6;
  --primary-foreground: #0b1220;
  --primary-50: #0b1a30;
  --primary-100: #0f2342;
}

/* ---------- TYPOGRAPHY ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ---------- REPORT STYLING ---------- */
.report-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.report-section-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.report-highlight {
  background: var(--primary-50);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
}

/* ---------- PRINT STYLES ---------- */
@media print {
  body { background: white; color: black; }
  .no-print { display: none !important; }
  .report-section { page-break-inside: avoid; border: 1px solid #ddd; }
  a { text-decoration: none; color: inherit; }
}

/* ---------- RESPONSIVE DESIGN ---------- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* =================================================================
   LeaseParser calculator UI tweaks (aligned controls & consistent rhythm)
   ================================================================= */

/* Card shell for calculator */
.lp-card {
  border: 1px solid var(--lp-border, #e5e7eb);
  border-radius: 16px;
  background: #fff;
}

/* Field block: label/hint in one row, control below */
.lp-field { display: grid; grid-template-rows: auto auto; row-gap: 6px; }
.lp-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.lp-field-label { font-weight: 600; color: #111827; }
.lp-field-hint { font-size: 12px; color: #6b7280; }

/* Inputs */
.lp-input {
  width: 100%;
  font: inherit;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
  transition: box-shadow .15s, border-color .15s;
  min-height: 44px;                 /* unified height */
  box-sizing: border-box;
}
.lp-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.25); }

/* Date input renders shorter on some browsers: normalize */
.lp-input[type="date"] { height: 44px; padding: .5rem .75rem; box-sizing: border-box; }

/* Remove number spinners */
.lp-input[type=number]::-webkit-outer-spin-button,
.lp-input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lp-input[type=number] { -moz-appearance: textfield; }

/* Checkbox row: styled to match input height/feel */
.lp-check {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  min-height: 44px;                 /* match inputs */
  padding: 0 .25rem;
  border: 1px solid #d1d5db;        /* same border as inputs */
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.lp-check input[type="checkbox"] { width: 18px; height: 18px; }

/* Prevent wrap that causes uneven heights in grid cells */
.lp-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Uniform buttons/links */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  min-height: 44px;                  /* same height as inputs */
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .05s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.lp-btn:active { transform: translateY(1px); }
.lp-btn--primary { background: #ffffff; color: #1d4ed8; border-color: #e5e7eb; }
.lp-btn--primary:hover { background: #f3f4f6; }

/* Summary rows */
.lp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.lp-divider { border-top: 1px solid #bfdbfe; margin: .5rem 0; }

/* Section separators inside the form */
.lp-section { border-top: 1px solid #e5e7eb; padding-top: 1.25rem; margin-top: 1.25rem; }
