/* Shared Global Styles - Used across all pages */

/* Google Fonts imported here */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* CSS Variables - Used throughout all pages */
:root {
  --teal: #00a19d;
  --teal-dark: #00796b;
  --teal-light: #e6f7f6;
  --red: #d62828;
  --red-dark: #b01f1f;
  --red-light: #fdeaea;
  --white: #ffffff;
  --off-white: #f7f9f9;
  --gray-light: #efefef;
  --gray: #777777;
  --dark: #1a1a1a;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
}

/* NAV injected by nav.js */

/* Dark Theme - Applied across all pages */
@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #e0e0e0;
  }
}

/* ===== Shared inner-page styles (quote forms, footer) ===== */

/* Quote layout */
.quote-container { max-width: 1400px; margin: 3rem auto; padding: 0 1.5rem; }
.quote-form { background: var(--white); border: 1px solid var(--gray-light); border-radius: 12px; padding: 2.5rem 2rem; box-shadow: 0 4px 24px rgba(0,0,0,0.06); display: flex; flex-direction: column; gap: 1.5rem; }

/* Form elements */
.form-group { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-section { border: 1px solid var(--gray-light); border-radius: 10px; padding: 1.1rem; margin-bottom: 1.2rem; }
.form-section h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 0.4rem; }
.form-section-note { color: var(--gray); font-size: 0.9rem; margin-bottom: 0.9rem; }
.repeat-card { border: 1px solid var(--gray-light); border-radius: 10px; background: var(--off-white); padding: 1rem; margin-bottom: 0.9rem; }
.repeat-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.repeat-card-title { font-weight: 700; }
.inline-options { display: flex; gap: 1rem; flex-wrap: wrap; }
.inline-options label { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; cursor: pointer; }
.hidden { display: none !important; }
label { font-size: 0.88rem; font-weight: 600; color: var(--dark); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; padding: 0.65rem 0.85rem;
  border: 1px solid #ddd; border-radius: 7px;
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; color: var(--dark);
  background: var(--off-white); transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,161,157,0.12); background: var(--white); }
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; padding: 0; border: none; background: none; appearance: auto; cursor: pointer; }
textarea { min-height: 100px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; cursor: pointer; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.month-year-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.date-triplet { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }

/* Buttons */
.btn-submit { background: var(--red); color: var(--white); border: none; border-radius: 8px; padding: 0.8rem 1.8rem; font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.15s; text-decoration: none; display: inline-block; }
.btn-submit:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-reset { background: var(--off-white); color: var(--dark); border: 1px solid var(--gray-light); border-radius: 8px; padding: 0.8rem 1.4rem; font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-reset:hover { background: var(--gray-light); }
.btn-add { background: var(--teal-light); color: var(--teal-dark); border: 1px solid rgba(0,121,107,0.2); border-radius: 8px; padding: 0.55rem 0.85rem; font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 600; cursor: pointer; }
.btn-remove { background: var(--red-light); color: var(--red); border: 1px solid rgba(214,40,40,0.2); border-radius: 6px; padding: 0.35rem 0.65rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; }

/* Sub-page footer */
footer { background: var(--dark); padding: 3rem 2.5rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-desc { font-size: 0.9rem; line-height: 1.65; color: #aaa; }
.footer-col-title { font-weight: 700; color: var(--white); margin-bottom: 0.75rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links a { text-decoration: none; color: #aaa; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--teal); }
.footer-copy { color: #666; font-size: 0.8rem; }
.footer-cert { font-size: 0.8rem; color: var(--teal); font-weight: 500; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; padding-top: 1.2rem; font-size: 0.8rem; color: #666; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
  .quote-container { padding: 0; margin: 0; }
  .quote-form { padding: 1rem; border-radius: 0; }
  .form-row { grid-template-columns: 1fr; }
}

/* Inner-page dark mode */
@media (prefers-color-scheme: dark) {
  .quote-form { background: #2a2a2a; border-color: #444; }
  .form-section { background: #252525; border-color: #444; }
  .form-section h2 { color: #e0e0e0; }
  .form-section-note { color: #b0b0b0; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { background: #333; color: #e0e0e0; border-color: #444; }
  input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { background: #3a3a3a; border-color: var(--teal); }
  label { color: #e0e0e0; }
  .repeat-card { background: #2a2a2a; border-color: #444; }
  .btn-reset { background: #333; color: #e0e0e0; border-color: #444; }
  .btn-reset:hover { background: #444; }
  .btn-add { background: rgba(0, 161, 157, 0.2); color: #4db8b3; border-color: #445; }
  .btn-remove { background: rgba(214, 40, 40, 0.2); color: #ff6b6b; border-color: #665; }
  footer { background: #0f0f0f; color: #999; }
  .footer-bottom { border-color: #333; color: #666; }
  .footer-links a { color: #999; }
  .footer-links a:hover { color: var(--teal); }
}
