/* =========================================================
   JGCC Contact Form — Front-end Styles
   ========================================================= */

.jgcc-cf-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px;
}

.jgcc-cf-wrap h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.3;
}

/* Screen-reader only — visually hidden but accessible */
.jgcc-cf-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;
}

.jgcc-cf-wrap .jgcc-cf-desc {
    margin: 0 0 24px;
    color: #555;
    font-size: 15px;
}

/* ---- Grid ---- */

.jgcc-cf-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.jgcc-cf-form__field {
    flex: 1 1 calc(50% - 16px);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.jgcc-cf-form__field--full {
    flex: 1 1 100%;
}

.jgcc-cf-form__field--third {
    flex: 1 1 calc(33.333% - 16px);
}

/* ---- Labels & Inputs ---- */

.jgcc-cf-form__field label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.jgcc-cf-form__field label .jgcc-cf-required {
    color: #d63638;
    margin-left: 2px;
}

.jgcc-cf-form__field input[type="text"],
.jgcc-cf-form__field input[type="email"],
.jgcc-cf-form__field textarea,
.jgcc-cf-form__field select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 0px solid #ccc;
    border-radius: 0px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    line-height: 1.4;
    height: auto;
}

/* Ensure select matches text inputs in height */
.jgcc-cf-form__field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    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='%23333' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 32px;
}

.jgcc-cf-form__field input:focus,
.jgcc-cf-form__field textarea:focus,
.jgcc-cf-form__field select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.jgcc-cf-form__field textarea {
    min-height: 120px;
    resize: vertical;
}

/* ---- Checkbox ---- */

.jgcc-cf-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
}

.jgcc-cf-form__checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #0073aa;
}

.jgcc-cf-form__checkbox label {
    font-weight: 400;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}

/* ---- Errors ---- */

.jgcc-cf-form__field--error input,
.jgcc-cf-form__field--error textarea,
.jgcc-cf-form__field--error select {
    border-color: #d63638;
}

.jgcc-cf-form__error {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #d63638;
}

/* ---- Status messages ---- */

.jgcc-cf-form__status {
    display: none;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.5;
}

/* ---- Submit ---- */

.jgcc-cf-form__actions {
    margin-top: 20px;
}

.jgcc-cf-form__submit-btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: black;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.jgcc-cf-form__submit-btn:hover,
.jgcc-cf-form__submit-btn:focus {
    background: #005177;
}

.jgcc-cf-form__submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Honeypot ---- */

.jgcc-cf-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ---- reCAPTCHA v2 checkbox widget ---- */

.jgcc-cf-form__recaptcha {
    margin-top: 12px;
    margin-bottom: 4px;
}

/* ---- Responsive ---- */

@media ( max-width: 600px ) {
    .jgcc-cf-form__field,
    .jgcc-cf-form__field--third {
        flex: 1 1 100%;
    }

    .jgcc-cf-wrap {
        padding: 16px;
    }
}
