/* Tailwind v4 via CDN is loaded separately — this file holds custom properties and overrides */
:root {
  --color-primary: #1e3a5f;
  --color-primary-light: #2d5a8e;
  --color-accent: #3b82f6;
  --color-surface: #f8fafc;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;
  --color-muted: #64748b;
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-surface);
  color: #1e293b;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  font-size: 16px;
}

/* Form input styles */
.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s;
}
.form-input:focus {
  box-shadow: 0 0 0 2px var(--color-accent);
  border-color: transparent;
}

/* Radio button styles */
.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #4b5563;
}
.radio-option:hover {
  border-color: #9ca3af;
}
.radio-option.active {
  border-color: var(--color-accent);
  background: #eff6ff;
  color: var(--color-accent);
  font-weight: 600;
}
.radio-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* Calculate button */
.calc-btn {
  width: 100%;
  padding: 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.calc-btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.calc-btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.calc-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.calc-btn-secondary:hover {
  background: #e5e7eb;
}

/* Result card styles */
.result-card {
  border-radius: 1rem;
  border-width: 2px;
  padding: 1.5rem;
}
.result-pass { background: #f0fdf4; border-color: #bbf7d0; }
.result-fail { background: #fef2f2; border-color: #fecaca; }
.result-conditional { background: #fffbeb; border-color: #fde68a; }
.result-info { background: #eff6ff; border-color: #bfdbfe; }

/* Condition items */
.condition-pass {
  padding: 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
}
.condition-fail {
  padding: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
}

/* Score bar */
.score-bar-track {
  width: 100%;
  height: 0.75rem;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease-out;
  background: var(--color-accent);
}

/* Disclaimer */
.disclaimer-box {
  margin-top: 2rem;
  padding: 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

/* FAQ details */
details.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
}
details.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
  background: white;
  transition: background 0.15s;
}
details.faq-item summary:hover {
  background: #f9fafb;
}
details.faq-item[open] summary .faq-chevron {
  transform: rotate(180deg);
}
details.faq-item .faq-content {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.625;
  border-top: 1px solid #f3f4f6;
  padding-top: 0.75rem;
}

/* Ad placeholder */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  color: #d1d5db;
  height: 90px;
}

/* Deposit table */
.deposit-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}
.deposit-table th, .deposit-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
}
.deposit-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #4b5563;
}
.deposit-table .highlight-cell {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 700;
}
.deposit-table .highlight-row {
  background: #eff6ff;
}
.deposit-table .highlight-col {
  color: #2563eb;
  font-weight: 500;
}

/* Repeater field */
.repeater-item {
  position: relative;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
}
.repeater-add {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.repeater-add:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.repeater-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.15s;
}
.repeater-remove:hover {
  color: #ef4444;
}

/* Timeline for score growth */
.timeline-line {
  position: absolute;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dbeafe;
}
.timeline-dot {
  position: absolute;
  left: 0.875rem;
  top: 0.25rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  border: 2px solid #93c5fd;
  background: white;
}
.timeline-dot.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 6px -1px rgba(30,58,95,0.2);
}

/* Cutline region card */
.cutline-card { padding:0.75rem; border-radius:0.5rem; border-width:1px; }
.cutline-high { background:#f0fdf4; border-color:#bbf7d0; }
.cutline-medium { background:#fffbeb; border-color:#fde68a; }
.cutline-low { background:#fef2f2; border-color:#fecaca; }

/* Stacked bar for score growth */
.stacked-bar {
  width:100%; height:1.25rem; background:#f9fafb; border-radius:9999px; overflow:hidden; display:flex;
}
.stacked-bar > div { height:100%; transition: width 0.5s; }

/* Hidden utility */
.hidden { display: none !important; }
