.kchws-form-template-inner,
.kchws-form-page {
    width: 100%;
}

.kchws-form-box {
    max-width: 980px;
    margin: 30px auto;
    padding: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)), var(--kchws-content-blocks-bg, var(--kchws-article-content-bg, #ffffff)) center center / cover no-repeat !important;
    border: 1px solid rgba(90, 71, 46, 0.28);
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 10px 14px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.22), inset 0 -12px 18px rgba(0,0,0,.04);
}

.kchws-form-title {
    margin: 0 0 12px;
    color: #000000 !important;
}

.kchws-form-intro {
    margin: 0 0 24px;
    color: #374151;
}

.kchws-form-intro p:last-child,
.kchws-form-success p:last-child {
    margin-bottom: 0;
}

.kchws-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
    align-items: start;
}

.kchws-form-col {
    min-width: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
}

.kchws-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}

.kchws-field input[type="text"],
.kchws-field input[type="email"],
.kchws-field input[type="tel"],
.kchws-field input[type="number"],
.kchws-field input[type="date"],
.kchws-field select,
.kchws-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    box-sizing: border-box;
    font: inherit;
    background: #fff;
    color: #111827;
}

.kchws-field textarea {
    min-height: 130px;
    resize: vertical;
}

.kchws-date-selects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.kchws-field-description,
.kchws-math-note {
    margin-top: 7px;
    font-size: 13px;
    opacity: 0.8;
}

.kchws-math-note {
    margin-top: 0;
    margin-bottom: 8px;
    color: #111827;
}

.kchws-checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
}

.kchws-checkbox input[type="checkbox"] {
    margin-top: 3px;
}

.kchws-checkbox span {
    color: #000000;
}

.kchws-required {
    color: #b42318;
}

.kchws-form-actions {
    margin-top: 22px;
}

.kchws-form-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 13px 20px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    cursor: pointer;
    font: inherit;
}

.kchws-form-success,
.kchws-form-errors {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 10px;
}

.kchws-form-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.kchws-form-errors {
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
}

.kchws-form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.kchws-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 767px) {
    .kchws-form-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .kchws-form-box {
        padding: 20px;
    }

    .kchws-form-col {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100%;
    }

    .kchws-date-selects {
        grid-template-columns: minmax(0, 1fr);
    }
}

.kchws-conditional-followup {
    margin-top: 12px;
}

.kchws-conditional-followup[hidden] {
    display: none !important;
}

.kchws-language-switcher {
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.kchws-language-switcher select {
    min-width: 120px;
}


/* v1.4.26 – readable language selector and persistent helper texts */
.kchws-language-switcher {
    color: #000000 !important;
}

.kchws-language-switcher label,
.kchws-language-switcher strong {
    color: #000000 !important;
}

.kchws-language-switcher select,
.kchws-language-select {
    color: #000000 !important;
    background-color: #ffffff !important;
    border: 1px solid #8c8f94;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 150px;
}

.kchws-field-description {
    display: block !important;
    visibility: visible !important;
    color: #000000 !important;
    opacity: 1 !important;
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.35;
}

/* v1.4.30 – file upload note readability */
.kchws-file-note {
    display: block !important;
    margin-top: 7px;
    color: #000000 !important;
    opacity: 1 !important;
    font-size: 14px;
    line-height: 1.35;
}

.kchws-field input[type="file"] {
    color: #000000 !important;
}

/* v1.4.31 – custom date picker for date fields */
.kchws-date-picker {
    position: relative;
}

.kchws-date-picker .kchws-date-input {
    cursor: pointer;
}

.kchws-date-calendar {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    width: min(340px, 100%);
    padding: 12px;
    background: #ffffff;
    border: 1px solid #cfd6dd;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    color: #111827;
}

.kchws-date-calendar[hidden] {
    display: none !important;
}

.kchws-date-calendar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(100px, 0.75fr);
    gap: 8px;
    margin-bottom: 10px;
}

.kchws-date-calendar-head select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cfd6dd;
    border-radius: 7px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.kchws-date-calendar-weekdays,
.kchws-date-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.kchws-date-calendar-weekdays {
    margin-bottom: 5px;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.kchws-date-day,
.kchws-date-empty {
    min-height: 34px;
}

.kchws-date-day {
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: center;
}

.kchws-date-day:hover,
.kchws-date-day:focus {
    border-color: #111827;
    outline: none;
}

.kchws-date-day.is-selected {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

@media (max-width: 767px) {
    .kchws-date-calendar {
        width: 100%;
    }
}

/* v1.4.32 – disabled dates outside the allowed range */
.kchws-date-day.is-disabled,
.kchws-date-day:disabled {
    opacity: .32;
    cursor: not-allowed;
    background: transparent;
}

/* v1.4.37 – collapsible shortcode form / accordion */
.kchws-form-accordion {
    width: 100%;
    max-width: 980px;
    margin: 18px auto;
    border: 1px solid rgba(90, 71, 46, 0.28);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)), var(--kchws-content-blocks-bg, var(--kchws-article-content-bg, #ffffff)) center center / cover no-repeat;
    box-shadow: 0 8px 14px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.20);
}

.kchws-form-accordion-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: #000000;
    cursor: pointer;
    padding: 18px 22px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font: inherit;
}

.kchws-form-accordion-toggle:hover,
.kchws-form-accordion-toggle:focus-visible {
    background: rgba(255,255,255,.16);
}

.kchws-form-accordion-toggle:focus-visible {
    outline: 2px solid #111827;
    outline-offset: -3px;
}

.kchws-form-accordion-title {
    color: #000000;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.25;
    font-weight: 700;
}

.kchws-form-accordion-arrow {
    width: 11px;
    height: 11px;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    transform: rotate(45deg);
    transition: transform .2s ease;
    margin-top: -2px;
}

.kchws-form-accordion.is-open .kchws-form-accordion-arrow {
    transform: rotate(225deg);
    margin-top: 5px;
}

.kchws-form-accordion-content[hidden] {
    display: none !important;
}

.kchws-form-accordion-content > .kchws-form-page > .kchws-form-box {
    margin: 0;
    max-width: none;
    border: 0;
    border-top: 1px solid rgba(90, 71, 46, 0.20);
    border-radius: 0;
    box-shadow: none;
    background: transparent !important;
}

.kchws-form-accordion-content .kchws-form-title {
    display: none;
}

@media (max-width: 767px) {
    .kchws-form-accordion-toggle {
        padding: 15px 16px 12px;
    }
}
