/* FORM WRAPPER
---------------------------------------- */
.kofc-coat-request-form {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 2rem 2.25rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e4f0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
    font-size: 16px;
    line-height: 1.4;
}

/* TITLES & TEXT
---------------------------------------- */
.kofc-coat-request-form h3.kofc-cr-section-title {
    font-size: 1.3rem;
    margin: 1.75rem 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kofc-cr-helper-text {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #555;
}

/* FIELDS
---------------------------------------- */
.kofc-cr-field-group {
    margin-bottom: 1rem;
}

.kofc-cr-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.kofc-cr-field-group input,
.kofc-cr-field-group select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    border: 1px solid #c5c9d6;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.kofc-cr-field-group input:focus,
.kofc-cr-field-group select:focus {
    outline: none;
    border-color: #002b5c;
    box-shadow: 0 0 0 2px rgba(0, 43, 92, 0.12);
}

/* REQUIRED ASTERISK */
.kofc-cr-required {
    color: #b00020;
}

/* DIVIDER */
.kofc-cr-divider {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid #e2e4f0;
}

/* CHECKBOXES — FIX ALIGNMENT
---------------------------------------- */
.kofc-cr-checkbox-group {
    margin: 0.75rem 0;
    text-align: left;
}

.kofc-cr-checkbox-group label {
    display: grid !important;
    grid-template-columns: 22px 1fr; /* Checkbox column + text column */
    align-items: flex-start;
    justify-items: start;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: none;
}

/* FIX: Stop checkboxes from expanding to full width */
.kofc-cr-checkbox-group input[type="checkbox"] {
    width: auto !important;       /* remove inherited 100% width */
    min-width: 16px !important;   /* ensure minimum clickable size */
    max-width: 20px !important;   /* never grow wider than this */
    height: 16px;
    flex-shrink: 0;               /* prevent shrinking or stretching */
    margin-top: 3px !important;
    margin-right: 0 !important;
}

/* CHILD ROWS
---------------------------------------- */
#kofc-cr-children-wrapper {
    margin-top: 0.5rem;
}

.kofc-cr-child-row {
    border-radius: 8px;
    border: 1px solid #e2e4f0;
    background: #f8f9ff;
    padding: 1rem;
    margin-bottom: 0.9rem;
}

/* GRID LAYOUT FOR CHILD FIELDS ON LARGE SCREENS */
@media (min-width: 640px) {
    .kofc-cr-child-row {
        display: grid;
        grid-template-columns: 1.1fr 0.6fr 0.7fr auto;
        gap: 0.75rem 1rem;
        align-items: end;
    }

    .kofc-cr-child-row .kofc-cr-field-group {
        margin-bottom: 0;
    }
}

/* BUTTONS
---------------------------------------- */
.kofc-cr-add-child,
.kofc-cr-remove-child,
.kofc-cr-submit-button {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease,
                transform 0.05s ease;
}

/* Primary button (Add + Submit) */
.kofc-cr-submit-button,
.kofc-cr-add-child {
    background: #002b5c;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 43, 92, 0.25);
}

.kofc-cr-submit-button:hover,
.kofc-cr-add-child:hover {
    background: #001a3a;
    box-shadow: 0 4px 10px rgba(0, 43, 92, 0.35);
    transform: translateY(-1px);
}

/* Remove child button */
.kofc-cr-remove-child {
    background: #ffffff;
    color: #b00020;
    border: 1px solid #e0aab4;
    padding-inline: 0.9rem;
}

.kofc-cr-remove-child:hover {
    background: #ffe7ea;
}

/* Add child button spacing */
#kofc-cr-add-child.kofc-cr-add-child {
    margin-top: 0.5rem;
}

/* SUBMIT BUTTON POSITION */
.kofc-cr-submit-wrap {
    margin-top: 1.5rem;
    text-align: right;
}

@media (max-width: 600px) {
    .kofc-cr-submit-wrap {
        text-align: center;
    }

    .kofc-cr-submit-button,
    .kofc-cr-add-child {
        width: 100%;
        text-align: center;
    }
}

/* STATUS MESSAGES
---------------------------------------- */
.kofc-cr-success-message,
.kofc-cr-error-message {
    max-width: 800px;
    margin: 0 auto 1.25rem auto;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.kofc-cr-success-message {
    background: #e6f7ea;
    border: 1px solid #b1e2bf;
    color: #145c2b;
}

.kofc-cr-error-message {
    background: #fde7ea;
    border: 1px solid #f1b4be;
    color: #8b1a30;
}
