/* ── GreenLight Public Styles ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --gl-ink:          #1e2535;
    --gl-accent:       #1d4ed8;
    --gl-accent-hover: #1e40af;
    --gl-accent-soft:  #eff6ff;
    --gl-success:      #059669;
    --gl-success-soft: #ecfdf5;
    --gl-danger:       #e11d48;
    --gl-danger-soft:  #fff1f2;
    --gl-warning:      #d97706;
    --gl-warning-soft: #fffbeb;
    --gl-border:       #dde3ed;
    --gl-fill:         #f7f9fc;
    --gl-text:         #111827;
    --gl-text-muted:   #64748b;
    --gl-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ── Icons ── */
.gl-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }

/* ── Tour list ── */
.gl-tour-list { font-family: var(--gl-font); margin: 0 0 40px; color: var(--gl-text); }
.gl-tour-list__title { color: var(--gl-ink); font-size: 1.6em; margin-bottom: 20px; }
.gl-tour-grid { display: grid; gap: 24px; }
.gl-tour-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.gl-tour-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.gl-tour-grid--cols-1 { grid-template-columns: 1fr; }

.gl-tour-card { background: #fff; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(16,24,32,.06); transition: box-shadow .2s, transform .2s; }
.gl-tour-card:hover { box-shadow: 0 8px 24px rgba(16,24,32,.1); transform: translateY(-2px); }
.gl-tour-card__header { background: var(--gl-ink); padding: 20px; color: #fff; }
.gl-tour-card__name { margin: 0 0 6px; font-size: 1.15em; color: #fff; }
.gl-tour-card__destination { margin: 0; font-size: .9em; opacity: .85; display: flex; align-items: center; gap: 6px; }
.gl-tour-card__body { padding: 16px 20px; flex: 1; }
.gl-tour-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9em; color: #444; }
.gl-tour-card__meta-icon { color: var(--gl-accent); display: inline-flex; }
.gl-tour-card__meta--closing { color: var(--gl-warning); }
.gl-tour-card__meta--closing .gl-tour-card__meta-icon { color: var(--gl-warning); }
.gl-tour-card__desc { margin-top: 12px; font-size: .88em; color: #555; padding-top: 12px; }
.gl-tour-card__footer { padding: 16px 20px; background: var(--gl-fill); }

/* ── Buttons — differentiated by fill colour, not border ── */
.gl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; font-size: .95em; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: background .15s, color .15s; font-family: var(--gl-font); line-height: 1; }
.gl-btn-primary  { background: var(--gl-accent); color: #fff; }
.gl-btn-primary:hover { background: var(--gl-accent-hover); color: #fff; }
.gl-btn-secondary{ background: var(--gl-fill); color: var(--gl-ink); }
.gl-btn-secondary:hover { background: var(--gl-accent-soft); color: var(--gl-accent-hover); }
.gl-btn-disabled  { background: #eceef0; color: #9aa1a9; cursor: not-allowed; }
.gl-btn-large { padding: 14px 32px; font-size: 1.05em; width: 100%; }
.gl-btn-sm { padding: 6px 14px; font-size: .85em; }

/* ── Notices ── */
.gl-notice { padding: 14px 18px; margin-bottom: 20px; font-size: .95em; color: var(--gl-text); position: relative; }
.gl-notice::before { content: ''; position: absolute; top: 8px; left: 8px; width: 8px; height: 8px; border-radius: 50%; }
.gl-notice-info  { background: var(--gl-accent-soft); }
.gl-notice-info::before { background-color: var(--gl-accent); }
.gl-notice-info a { color: var(--gl-accent-hover); font-weight: 600; }
.gl-notice-error { background: var(--gl-danger-soft); color: var(--gl-danger); }
.gl-notice-error::before { background-color: var(--gl-danger); }
.gl-notice-warn  { background: var(--gl-warning-soft); }
.gl-notice-warn::before { background-color: var(--gl-warning); }
.gl-notice ul { margin: 8px 0 0 20px; }

/* ── Form wrap ── */
.gl-form-wrap { font-family: var(--gl-font); max-width: 760px; margin: 0 auto; color: var(--gl-text); }

/* ── Tour banner (form header) ── */
.gl-form-tour-banner { background: var(--gl-ink); color: #fff; padding: 20px 24px; margin-bottom: 0; }
.gl-form-tour-banner__name { font-size: 1.3em; font-weight: 700; margin-bottom: 6px; }
.gl-form-tour-banner__meta { font-size: .9em; opacity: .85; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gl-form-tour-banner__meta .gl-icon { opacity: .9; }
.gl-form-tour-banner__meta-sep { opacity: .5; }

/* ── Fieldsets ── */
.gl-fieldset { padding: 24px; margin-bottom: 20px; background: #fff; box-shadow: 0 1px 3px rgba(16,24,32,.06); }
.gl-legend { float: none; font-size: 1.05em; font-weight: 700; color: var(--gl-ink); padding: 0 8px; margin-left: -8px; }
.gl-section-note { color: var(--gl-text-muted); font-size: .88em; margin: 4px 0 16px; }

/* ── Field grid ── */
.gl-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gl-field { display: flex; flex-direction: column; gap: 5px; }
.gl-field--full { grid-column: 1 / -1; }
.gl-field--wide { grid-column: 1 / -1; }
.gl-field label { font-size: .9em; font-weight: 600; color: #333; }
.gl-required { color: var(--gl-danger); }

.gl-input, .gl-textarea {
    width: 100%; padding: 10px 12px;
    font-size: .95em; font-family: var(--gl-font);
    transition: background-color .15s, box-shadow .15s;
    box-sizing: border-box;
    color: var(--gl-text);
    background: var(--gl-fill);
    border: none;
    border-radius: 0;
}
.gl-input:focus, .gl-textarea:focus {
    outline: none; background: var(--gl-accent-soft);
    box-shadow: 0 0 0 3px rgba(29,78,216,.15);
}
.gl-input.gl-input--error, .gl-textarea.gl-textarea--error { background: var(--gl-danger-soft); }
.gl-input--sig { font-size: 1.2em; font-style: italic; }
.gl-textarea { resize: vertical; }

/* Native <select> chrome paints its own rounded skin regardless of
   border-radius:0 unless the OS widget theme is disabled. */
select.gl-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 6px;
    cursor: pointer;
}

/* ── Field errors ── */
.gl-field-error { color: var(--gl-danger); font-size: .82em; min-height: 16px; }

/* ── Indemnity ── */
.gl-fieldset--indemnity .gl-indemnity-wording {
    max-height: 300px; overflow-y: auto;
    padding: 16px; background: var(--gl-fill);
    font-size: .88em; line-height: 1.6; color: #333;
    margin-bottom: 16px;
}
.gl-consent-checks { display: flex; flex-direction: column; gap: 12px; }
.gl-checkbox-label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.gl-checkbox { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--gl-accent); }
.gl-checkbox-label span { font-size: .92em; color: #333; }

/* ── Signature ── */
.gl-fieldset--signature .gl-sig-instruction { color: #555; font-size: .92em; margin-bottom: 16px; }
.gl-sig-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.gl-sig-tab { padding: 9px 20px; cursor: pointer; background: var(--gl-fill); font-size: .9em; color: var(--gl-ink); }
.gl-sig-tab.active { background: var(--gl-ink); color: #fff; }
.gl-sig-canvas-wrap { background: var(--gl-fill); margin-bottom: 10px; overflow: hidden; touch-action: none; }
.gl-sig-canvas { display: block; width: 100%; height: 150px; cursor: crosshair; }
.gl-sig-declaration { background: var(--gl-accent-soft); padding: 12px 16px; margin-top: 12px; font-size: .88em; color: #444; }
.gl-sig-meta { margin: 6px 0 0; color: #555; }
.gl-hidden { display: none !important; }

/* ── Submit ── */
.gl-form-submit { margin-top: 8px; }
.gl-submit-note { text-align: center; font-size: .85em; color: var(--gl-text-muted); margin-top: 10px; }
.gl-btn-spinner { display: inline-flex; align-items: center; gap: 8px; }
.gl-spinner-ring {
    width: 1em; height: 1em; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: gl-spin .7s linear infinite;
}
@keyframes gl-spin { to { transform: rotate(360deg); } }

/* ── Success panel ── */
.gl-success-panel { text-align: center; padding: 40px 30px; background: #fff; box-shadow: 0 1px 3px rgba(16,24,32,.06); margin-top: 20px; }
.gl-success-icon { color: var(--gl-success); line-height: 1; margin-bottom: 16px; width: 64px; height: 64px; background: var(--gl-success-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.gl-success-icon .gl-icon { width: 28px; height: 28px; }
.gl-success-panel h2 { color: var(--gl-success); margin-bottom: 20px; }
.gl-success-details { background: var(--gl-accent-soft); padding: 16px 20px; text-align: left; display: inline-block; margin-bottom: 20px; min-width: 320px; }
.gl-success-details table { border-collapse: collapse; font-size: .92em; }
.gl-success-details td { padding: 4px 8px; }
.gl-success-details td:first-child { font-weight: 600; color: var(--gl-ink); white-space: nowrap; }
.gl-success-email-note { color: var(--gl-text-muted); font-size: .9em; margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 680px) {
    .gl-tour-grid--cols-3,
    .gl-tour-grid--cols-2 { grid-template-columns: 1fr; }
    .gl-field-grid { grid-template-columns: 1fr; }
    .gl-field--wide { grid-column: 1; }
}
