.event-application {
    margin-top: 2rem;
}
.event-application > summary {
    display: flex;
    width: fit-content;
    margin-inline: auto;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    min-width: min(280px, 100%);
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 32px;
    border: 2px solid var(--color-brand-1);
    border-radius: 50px;
    background: var(--color-brand-1);
    color: #fff;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    list-style: none;
}
.event-application > summary:hover {
    background: #fff;
    color: var(--color-brand-1);
    border-color: var(--color-brand-1);
}
.event-application__close {
    display: none;
}
.event-application[open] .event-application__close {
    display: inline;
}
.event-application > summary::-webkit-details-marker {
    display: none;
}
.event-application > summary:focus-visible {
    outline: 3px solid var(--color-brand-1);
    outline-offset: 4px;
}
.event-application input[readonly] {
    background-color: #f1f1f1;
}

/* PCではお問い合わせページの.txt-containerと同じ幅に揃える。 */
@media (min-width: 768px) {
    .event-application > .custom-form-container {
        width: 640px;
        max-width: 90%;
        margin-inline: auto;
    }
}

/* 送信成功時は完了メッセージだけを残す。失敗時は再入力できる状態を維持。 */
.event-application:has(.wpcf7-form.sent) > .custom-form-container > :not(.wpcf7),
.event-application .wpcf7-form.sent > :not(.wpcf7-response-output) {
    display: none;
}
.event-application .wpcf7-form.sent > .wpcf7-response-output {
    box-sizing: border-box;
    width: 100%;
    max-width: 640px;
    margin: 2rem auto;
    padding: 1.25rem;
    text-align: center;
}

.event-application input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: var(--color-bk);
    font: inherit;
}
.event-application input[type="number"]:focus {
    border-color: var(--color-brand-1);
    outline: 2px solid var(--color-brand-1);
    outline-offset: 2px;
}
.event-application .participant-ages {
    min-width: 0;
    padding: 0;
    border: 0;
}
.event-application .participant-age-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block: 12px;
}
.event-application .participant-age-row input {
    width: 100px;
    flex-shrink: 0;
}
.event-application .participant-ages-fallback textarea {
    height: 120px;
}
.event-application .participants-enhanced .participant-ages-fallback > p,
.event-application .participants-enhanced .participant-ages-fallback textarea {
    display: none;
}
