/**
 * Shared styles for Daybook tool pages (static HTML).
 * Used by: gst-calculator, hourly-rate-calculator, due-date-calculator,
 *          bank-account-formatter, gst-registration-checker.
 */
:root {
  --primary-color: #FF897B;
  --primary-color-hover: #ff7566;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --surface: #ffffff;
  --surface-secondary: #f9fafb;
  --page-bg: #e5e5e5;
}

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

body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--page-bg);
}

/* Header */
.header {
  background: var(--surface);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--text-dark);
}
.logo-yardstick { color: var(--primary-color); }
.header-cta {
  background: var(--primary-color);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s;
}
.header-cta:hover { background: var(--primary-color-hover); color: white; }

/* Hero */
.hero { padding: 2.5rem 2rem 3rem; text-align: center; }
.hero-inner { max-width: 560px; margin: 0 auto; }
.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
.hero-subtitle { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Calc box */
.calc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.calc-box p.gst-info { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.calc-box .mode-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--surface-secondary);
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.calc-box .mode-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.calc-box .mode-btn.active { background: var(--primary-color); color: white; }
.calc-box .mode-btn:not(.active):hover { color: var(--text-dark); background: rgba(255, 137, 123, 0.12); }
.calc-box label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.calc-box input,
.calc-box select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1.125rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.calc-box input:focus,
.calc-box select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 137, 123, 0.2);
}

/* Checkboxes (hourly-rate, due-date) */
#gst-registered-checkbox { width: auto; margin-bottom: 0; }
.gst-checkbox-label { margin-bottom: 0 !important; }
.gst-checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-secondary);
  border-radius: 8px;
}
.gst-checkbox { width: 20px; height: 20px; cursor: pointer; }
.gst-checkbox-label { cursor: pointer; font-weight: 500; }
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-secondary);
  border-radius: 8px;
}
.checkbox-input { width: 20px; height: 20px; cursor: pointer; }
.checkbox-label { cursor: pointer; font-weight: 500; }
#custom-terms-section { display: none; }

/* Result sections */
#result-section { display: none; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.result-label { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; font-weight: 500; }
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-label-primary { color: var(--primary-color); font-weight: 600; }
.result-value-wrap { display: flex; align-items: center; gap: 0.5rem; }
.result-value { font-size: 1.125rem; font-weight: 700; color: var(--text-dark); }
.result-value-primary { font-size: 1.375rem; color: var(--primary-color); }

/* Hourly rate specific */
#hourly-rate-display { font-size: 2.5rem; font-weight: 700; color: var(--primary-color); margin: 1rem 0; }
.warning-card {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 137, 123, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
}
.warning-text { margin: 0; font-size: 0.875rem; font-weight: 500; }
#breakdown-section { text-align: left; padding-top: 2rem; border-top: 1px solid var(--border); }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { color: var(--text-muted); }
.breakdown-value { font-weight: 600; }

/* Due date specific */
#due-date-display { font-size: 2rem; font-weight: 700; color: var(--primary-color); margin: 1rem 0; }
#friendly-due-date { color: var(--text-muted); font-size: 0.875rem; margin: 0.5rem 0 1.5rem 0; }
#details-section { text-align: left; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.details-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.details-row:last-child { border-bottom: none; }
.details-label { color: var(--text-muted); }
.details-value { font-weight: 600; }
.holiday-card {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--surface-secondary);
  border-radius: 6px;
}
.holiday-row { display: flex; justify-content: space-between; }
.holiday-name { color: var(--text-dark); }
.holiday-date { color: var(--text-muted); font-size: 0.875rem; }

/* Bank account specific */
#account-input {
  font-family: monospace;
  letter-spacing: 0.05em;
}
.result-status-container { display: none; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.result-status-container.visible { display: flex; }
#result-status { font-size: 1.5rem; font-weight: 700; color: #10b981; }
.formatted-account-section {
  padding: 1.5rem;
  background: var(--surface-secondary);
  margin-bottom: 1rem;
  border-radius: 8px;
}
.formatted-account-row { display: flex; justify-content: space-between; align-items: center; }
#formatted-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.05em;
}
.error-message-block {
  display: none;
  padding: 1rem;
  background: #fee2e2;
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.error-text { color: #991b1b; margin: 0; font-size: 0.875rem; }
.breakdown-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.breakdown-right { text-align: right; }
#bank-name-display { font-size: 1.25rem; font-weight: 700; color: var(--primary-color); }

/* Copy button - base (outline) */
.copy-btn {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.copy-btn:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.copy-btn.copy-btn-primary { background: var(--primary-color); border-color: var(--primary-color); color: white; }
.copy-btn.copied { background: #10b981; border-color: #10b981; color: white; }
/* Filled variant (bank formatter) */
.copy-btn.btn-filled {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
}
.copy-btn.btn-filled:hover { background: #ff7566; }

/* GST registration checker specific */
.result-card { padding: 1.5rem; border-radius: 8px; margin-bottom: 1rem; }
.result-card.must-register { background: #fef2f2; border-left: 4px solid #ef4444; }
.result-card.close { background: #fef3c7; border-left: 4px solid #f59e0b; }
.result-card.no-need { background: #d1fae5; border-left: 4px solid #10b981; }
.result-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.result-card p { margin-bottom: 1rem; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 0.5rem;
}
.btn:hover { background: #ff7566; }

/* GST registration checker - rules section below card */
.rules-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  text-align: center;
}
.rules-section h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.75rem; color: var(--text-dark); }
.rules-tagline { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1rem; }
.rules-section p { margin-bottom: 0.75rem; font-size: 0.9375rem; color: var(--text-dark); }
.rules-source { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0; }
.rules-source a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.rules-source a:hover { text-decoration: underline; }

/* Content (gst-calculator long form) */
.content { max-width: 800px; margin: 0 auto; padding: 3rem 2rem 4rem; }
.content h2 { font-size: 1.75rem; font-weight: 700; margin: 2.5rem 0 1rem; color: var(--text-dark); }
.content h2:first-of-type { margin-top: 0; }
.content p { margin-bottom: 1rem; color: var(--text-dark); font-size: 1.0625rem; }
.content ul, .content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.content li { margin-bottom: 0.5rem; font-size: 1.0625rem; }
.content a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.content a:hover { text-decoration: underline; }
.info-box {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
}
.info-box h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text-dark); }
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff7566 100%);
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem 0;
  border-radius: 12px;
}
.cta-section h2 { color: white; margin: 0 0 0.5rem 0; font-size: 1.75rem; }
.cta-section p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; font-size: 1.125rem; }
.cta-section .cta-button {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  transition: all 0.2s;
}
.cta-section .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  text-decoration: none;
  color: var(--primary-color);
}
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.trust-item i { color: var(--primary-color); font-size: 1rem; }
.faq-section { margin: 3rem 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question { font-size: 1.125rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.5rem; }
.faq-answer { color: var(--text-muted); font-size: 1rem; margin: 0; }
.tools-section { background: var(--surface-secondary); border-radius: 12px; padding: 2rem; margin: 2rem 0; }
.tools-section h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.tool-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s;
}
.tool-link:hover { border-color: var(--primary-color); text-decoration: none; }
.tool-link i { color: var(--primary-color); font-size: 1.25rem; width: 1.5rem; }
.embed-section { background: var(--surface-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; margin: 2rem 0; }
.embed-section h2 { margin-top: 0; }
.embed-section .embed-code-wrap { position: relative; margin: 1rem 0; }
.embed-section pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1.25rem 3rem 1.25rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.875rem;
  margin: 0;
}
.embed-section code { white-space: pre; }
.embed-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #e5e7eb;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}
.embed-copy-btn:hover { background: var(--primary-color); border-color: var(--primary-color); color: white; }
.embed-copy-btn.copied { background: #10b981; border-color: #10b981; color: white; }
.embed-copy-btn i { font-size: 0.875rem; }
.footer { background: #212529; padding: 2rem; margin-top: 0; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #9ca3af; font-size: 0.875rem; text-decoration: none; }
.footer-links a:hover { color: var(--primary-color); }

@media (max-width: 768px) {
  .header { padding: 0.75rem 1rem; }
  .header-inner { padding: 0 0.25rem; }
  .logo { font-size: 1.25rem; }
  .header-cta, .btn { padding: 0.75rem 1rem; min-height: 44px; }
  .hero { padding: 1.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-subtitle { font-size: 1rem; }
  .calc-box { padding: 1.25rem; }
  .calc-box input, .calc-box select { padding: 0.75rem 1rem; min-height: 44px; font-size: 1rem; }
  .mode-btn { padding: 0.75rem 0.5rem; min-height: 44px; }
  .copy-btn, .embed-copy-btn { min-height: 36px; padding: 0.5rem 0.75rem; }
  #hourly-rate-display, #due-date-display { font-size: 1.75rem; }
  #formatted-value { font-size: 1.25rem; }
  .formatted-account-row { flex-wrap: wrap; gap: 0.75rem; }
  .breakdown-row, .result-row { flex-wrap: wrap; gap: 0.25rem; }
  .rules-section { padding: 0 1rem 1.5rem; }
  .rules-section h2 { font-size: 1.125rem; }
  .content { padding: 2rem 1rem 3rem; }
  .content h2 { font-size: 1.375rem; }
  .info-box { padding: 1.25rem; }
  .cta-section { padding: 2rem 1rem; }
  .cta-section h2 { font-size: 1.375rem; }
  .trust-bar { gap: 1rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .footer { padding: 1.5rem 1rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
