.karen-form-container {
    width: 95%;
    margin: 0 auto;
}

.karen-form-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ccc;
    margin-top: 0;
    margin-bottom: 50px;
    table-layout: fixed;
}

.karen-form-table th,
.karen-form-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.karen-form-table th {
    background-color: #f7f7f7;
    text-align: left;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    font-size: 1em;
    width: 12em;
}

.karen-form-table td {
    background-color: #fff;
}

.karen-form-table .badge-required,
.karen-form-table .badge-not-required {
    font-size: 0.8em;
    border-radius: 3px;
    font-weight: normal;
    vertical-align: middle;
    display: block;
    width: 3em;
    text-align: center;
    padding: 4px 6px;
    line-height: 1;
    margin: 0;
    border: none;
}
.karen-form-table .badge-required {
    background-color: #d9534f;
    color: #fff;
}
.karen-form-table .badge-not-required {
    background-color: #fff;
    color: var(--color-main);
    border: 1px solid var(--color-main);
}

.karen-form-table input[type="email"],
.karen-form-table select,
.karen-form-table textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1.2em;
    background-color: #fff;
    line-height: 1.5;
}

.karen-form-table select {
    cursor: pointer;
    height: 48px;
}


/* 同意チェックボックスエリア */
.karen-form-check-area {
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin: 15px 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.karen-form-check-area:hover {
    background-color: #f0f4f8;
    border-color: #b0c4de;
    cursor: pointer;
}

.karen-form-check-area .wpcf7-list-item {
    width: 100% !important;
}

.karen-form-check-area label {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    margin: 0;
}

.karen-form-check-area input[type="checkbox"] {
    width: 20px;
    height: 20px;
    transform: scale(1.3);
    margin-right: 16px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

.karen-form-check-area .wpcf7-list-item-label {
    font-size: 1.1em;
    color: #333;
    line-height: 1.5;
    text-align: left;
}

.karen-form-check-area .wpcf7-list-item {
    margin-left: 0;
}

.karen-form-document-link {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 0px;
}

/* アップロードボタン */
.karen-form-file-upload input[type="file"] {
    width: 100%;
    border: none;
}
.karen-form-file-upload input[type="file"]::file-selector-button {
    border: none;
    padding: 3px 12px;
    border-radius: 100px;
    color: #fff;
    background-color: var(--color-main);
    transition: background-color 0.2s, border-color 0.2s;
    margin-right: 10px;
    font-size: 0.9em;
}
.karen-form-file-upload input[type="file"]::file-selector-button:hover {
    cursor: pointer;
    background-color: #99ffff;
    background-color: color-mix(in oklab, #fff 25%, var(--color-main));
}

/* 入力エラーヒント */
.karen-form-check-area .wpcf7-not-valid-tip {
    margin-left: 20px;
}

/* レスポンス */
.karen-form-response .wpcf7-response-output {
    border-width: 3px !important;
    border-radius: 3px;
    text-align: center;
    padding: 10px 15px !important;
    margin-top: 30px !important;
    margin-bottom: 40px !important;
}

/* 送信ボタン */
.karen-form-submit {
    text-align: center;
}

/* 処理中 */
.karen-form-submit .wpcf7-spinner {
    display: block;
    margin: 15px auto;
}

.karen-form-submit input[type="submit"] {
    color: #fff;
    border: none;
    padding: 16px 60px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    border-radius: 100em;
    font-size: 1.2em;
    min-width: 250px;
    background: var(--color-main);
}

.karen-form-submit input[type="submit"]:hover {
    opacity: 0.85;
}

@media screen and (max-width: 700px) {
    .karen-form-table th,
    .karen-form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
  
    .karen-form-table th {
        border-bottom: none;
        padding-bottom: 6px;
        padding-top: 16px;
    }
  
    .karen-form-check-item label {
        display: inline; /* スマホでは文章の折り返しに対応 */
    }
    .karen-form-table .badge-required,
    .karen-form-table .badge-not-required {
        display: inline;
        margin-left: 8px;
    }
}

