/* =============================================================================
   OH Registration Form — Stylesheet
   JACB Services — v1.0.0
   ============================================================================= */

:root {
    --ohr-forest:  #2d4a3e;
    --ohr-sage:    #7d8570;
    --ohr-cream:   #f0ece0;
    --ohr-bg:      #f5f3ee;
    --ohr-border:  #d8d5cc;
    --ohr-text:    #1a2e25;
    --ohr-muted:   #5a6b5e;
    --ohr-error:   #b91c1c;
    --ohr-radius:  4px;
}

.ohr-wrap {
    max-width: 760px;
    margin: 0 auto;
    font-family: inherit;
}

/* --- Test mode banner --- */
.ohr-test-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff7e6;
    border: 2px solid #d4851c;
    border-radius: var(--ohr-radius);
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.ohr-test-banner__label {
    font-weight: 700;
    color: #7a4a00;
    white-space: nowrap;
}

.ohr-test-banner__desc {
    color: #7a4a00;
    flex: 1;
}

.ohr-test-fill-btn {
    margin-left: auto;
    background: #d4851c;
    color: #fff;
    border: none;
    border-radius: var(--ohr-radius);
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    font-family: inherit;
}

.ohr-test-fill-btn:hover {
    background: #b8700f;
}

/* --- Messages --- */
.ohr-success,
.ohr-error { display: none; }

.ohr-success.is-visible {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #edf2ea;
    border-left: 4px solid var(--ohr-forest);
    border-radius: 0 var(--ohr-radius) var(--ohr-radius) 0;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.ohr-success__icon { font-size: 1.25rem; color: var(--ohr-forest); font-weight: 700; flex-shrink: 0; }
.ohr-success__msg  { color: var(--ohr-forest); font-weight: 600; font-size: 1rem; margin: 0; line-height: 1.5; }

.ohr-error.is-visible {
    display: block;
    background: #fef2f2;
    border-left: 4px solid var(--ohr-error);
    border-radius: 0 var(--ohr-radius) var(--ohr-radius) 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.ohr-error__msg { color: var(--ohr-error); font-weight: 600; font-size: 0.9375rem; margin: 0; }

/* --- Sections --- */
.ohr-section {
    background: #fff;
    border: 1px solid var(--ohr-border);
    border-radius: var(--ohr-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ohr-section__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ohr-forest);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ohr-cream);
}

.ohr-section__desc {
    font-size: 0.9375rem;
    color: var(--ohr-muted);
    margin: -0.5rem 0 1rem;
    line-height: 1.5;
}

/* --- Rows --- */
.ohr-row { display: grid; gap: 1rem; }
.ohr-row--two { grid-template-columns: 1fr 1fr; }

/* --- Fields --- */
.ohr-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.ohr-field:last-child { margin-bottom: 0; }
.ohr-field--submit { margin-bottom: 0; }

.ohr-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ohr-text);
    line-height: 1.3;
}

.ohr-req { color: var(--ohr-error); margin-left: 2px; }

/* --- Inputs --- */
.ohr-input,
.ohr-textarea,
.ohr-select {
    font-family: inherit;
    font-size: 1rem;
    color: var(--ohr-text);
    background: #ffffff;
    border: 1px solid var(--ohr-border);
    border-radius: var(--ohr-radius);
    padding: 0.6rem 0.875rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.ohr-input:focus,
.ohr-textarea:focus,
.ohr-select:focus {
    outline: none;
    border-color: var(--ohr-forest);
    box-shadow: 0 0 0 3px rgba(45,74,62,0.12);
}

.ohr-input.ohr-invalid,
.ohr-textarea.ohr-invalid,
.ohr-select.ohr-invalid {
    border-color: var(--ohr-error);
    box-shadow: 0 0 0 3px rgba(185,28,28,0.1);
}

.ohr-textarea { resize: vertical; min-height: 90px; }

.ohr-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 fill='%232d4a3e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* --- Yes/No grid --- */
.ohr-yn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ohr-yn-field {
    background: var(--ohr-bg);
    border: 1px solid var(--ohr-border);
    border-radius: var(--ohr-radius);
    padding: 0.75rem;
}

.ohr-yn-field .ohr-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: block;
}

.ohr-yn-options {
    display: flex;
    gap: 1rem;
}

.ohr-radio-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--ohr-text);
}

.ohr-radio-label input { accent-color: var(--ohr-forest); }

/* --- Checkbox --- */
.ohr-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9375rem;
    cursor: pointer;
    color: var(--ohr-text);
    line-height: 1.5;
}

.ohr-checkbox-label input {
    margin-top: 3px;
    accent-color: var(--ohr-forest);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* --- T&C box --- */
.ohr-tc-box {
    background: var(--ohr-bg);
    border: 1px solid var(--ohr-border);
    border-radius: var(--ohr-radius);
    padding: 1.25rem 1.5rem;
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ohr-muted);
    margin-bottom: 1.25rem;
}

.ohr-tc-box h3 { font-size: 1rem; color: var(--ohr-text); margin: 0 0 0.75rem; }
.ohr-tc-box p  { margin: 0 0 0.75rem; }
.ohr-tc-box p:last-child { margin-bottom: 0; }

/* --- Button --- */
.ohr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ohr-cream) !important;
    background: var(--ohr-forest) !important;
    border: 2px solid var(--ohr-forest) !important;
    border-radius: var(--ohr-radius);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.ohr-btn:hover { background: #1a2e25 !important; border-color: #1a2e25 !important; transform: translateY(-1px); }
.ohr-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.ohr-btn__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(240,236,224,0.4);
    border-top-color: var(--ohr-cream);
    border-radius: 50%;
    animation: ohr-spin 0.6s linear infinite;
}

.ohr-btn__spinner.is-visible { display: inline-block; }

@keyframes ohr-spin { to { transform: rotate(360deg); } }

/* --- Privacy note --- */
.ohr-privacy {
    font-size: 0.8125rem;
    color: var(--ohr-muted);
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* --- Google Places autocomplete indicator --- */
.ohr-input[data-places] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d8570' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 2rem;
}

/* Override Google's autocomplete dropdown z-index */
.pac-container {
    z-index: 99999 !important;
    font-family: inherit;
    border: 1px solid #d8d5cc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.pac-item {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px 12px;
    cursor: pointer;
    color: #1a2e25;
}

.pac-item:hover,
.pac-item-selected {
    background: #edf2ea;
}

.pac-item-query {
    font-size: 0.9rem;
    color: #1a2e25;
}

.pac-matched {
    font-weight: 700;
}

/* --- Honeypot --- */
.ohr-honeypot {
    position: absolute; left: -9999px; top: -9999px;
    opacity: 0; height: 0; overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .ohr-row--two { grid-template-columns: 1fr; }
    .ohr-yn-grid  { grid-template-columns: 1fr; }
}
