@import url('https://fonts.googleapis.com/css2?family=Jockey+One&display=swap');

:root {
  --brand-green: #1A4D1E;
  --brand-green-dark: #123515;
  --bg: #F5F7F9;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #1F2937;
  --muted: #6B7280;
  --danger: #dc2626;
  --success: #16a34a;
  --focus: #1A4D1E;
}

/* Layout */
.form-page {
  background: var(--bg);
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.form-container {
  width: 100%;
  max-width: 980px;
  background: transparent;
}
.form-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand-green);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.06);
}
.form-title {
  margin: 0 0 6px;
  font-family: 'Jockey One', sans-serif;
  color: var(--brand-green);
  font-size: 2.5rem;
}
.form-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.25rem;
}

/* Cards */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.section-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  font-size: 1.125rem;
}

/* Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Inputs */
.gf-input,
.form-card select,
.form-card textarea,
.form-card input[type="text"],
.form-card input[type="time"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}
.checkbox-list label { display: inline-flex; align-items: center; gap: 8px; margin: 4px 12px 4px 0; }
.help-text { font-size: 0.85rem; color: var(--muted); margin-top: 6px; display:block; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.form-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.field-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 6px;
}

.view-value {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;

    font-size: 1rem;
    color: var(--text);

    font-weight: 400;
}
/* Buttons */

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;

    appearance: none;
    -webkit-appearance: none;

    min-width: 160px;
    height: 44px;
    padding: 0 20px;

    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;

    text-align: center;
    box-sizing: border-box;

    transition: all 0.15s;
}

.btn-primary {
    background: #fff;
    color: #1A4D1E;
    border: 1px solid #1A4D1E;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1A4D1E;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #1A4D1E;
    border: 1px solid #1A4D1E;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #1A4D1E;
    color: #fff;
}

.btn-link {
    background: #fff;
    color: #1A4D1E;
    text-decoration: none;
    border: 1px solid #1A4D1E;
    cursor: pointer;
}

.btn-link:hover {
    background: #1A4D1E;
    color: #fff;
    text-decoration: none;
}

.btn-danger {
    background: #fff;
    color: #dc2626;
    border: 1px solid #dc2626;
    cursor: pointer;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.form-actions button,
.form-actions a,
.form-actions input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    line-height: 1.2;
    margin: 0;
    vertical-align: middle;
}

/* Flash messages */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #064e3b;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.flash.hidden { display:none; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-icon { font-size: 1.2rem; line-height: 1; }
.flash-title { display:block; font-weight: 700; margin-right:6px; }
.flash-text { display:block; }
.flash-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Focus states for all controls */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Accessibility modes */
body.a11y-large-text { font-size: 27px; line-height: 2.0; }
/* Ensure tables (headers and contents) scale with Large Text in admin/forms */
body.a11y-large-text table,
body.a11y-large-text thead,
body.a11y-large-text tbody,
body.a11y-large-text th,
body.a11y-large-text td,
body.a11y-large-text .enquiries-table,
body.a11y-large-text .enquiries-table th,
body.a11y-large-text .enquiries-table td,
body.a11y-large-text .pagination,
body.a11y-large-text .pagination li,
body.a11y-large-text .pagination a {
  font-size: 1em !important;
  line-height: 1.6;
}
body.a11y-contrast {
  --bg: #ffffff;
  --card: #ffffff;
  --border: #111827;
  --text: #111827;
  --muted: #0a0a0a;
}

/* Responsive */
@media (max-width: 640px) {
  .form-title { font-size: 1.6rem; }
  .form-subtitle { font-size: 0.95rem; }
}

/* Field error messages */
.field-error { color: var(--danger); margin-top: 6px; font-size: 0.9rem; }

/* System-wide: make email addresses non-clickable when presented as mailto links */
a[href^="mailto:"] {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
}
