/* ==========================================================================
   RENEWED FORM STYLES
   ========================================================================== */

.mailForm--renewed {
    max-width: 640px;
    margin: 50px auto!important;
    padding: 24px 16px 40px;
    font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.mailForm--renewed *,
.mailForm--renewed *::before,
.mailForm--renewed *::after {
    box-sizing: border-box;
}

.mailForm__lead {
    font-size: 14px;
    color: #666;
    margin-bottom: 28px;
    line-height: 1.7;
}

.mailForm__note {
    font-size: 12px;
    color: #e58a8a;
}

/* ==========================================================================
   STEP INDICATOR
   ========================================================================== */
.stepIndicator {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 36px;
}

.stepIndicator__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.stepIndicator__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8dada;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.3s ease, transform 0.3s ease;
}

.stepIndicator__item.is-active .stepIndicator__num,
.stepIndicator__item.is-done .stepIndicator__num {
    background: #e58a8a;
    transform: scale(1.1);
}

.stepIndicator__label {
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.stepIndicator__item.is-active .stepIndicator__label,
.stepIndicator__item.is-done .stepIndicator__label {
    color: #e58a8a;
    font-weight: 600;
}

.stepIndicator__bar {
    flex: 1;
    height: 2px;
    background: #e8dada;
    margin: 17px 8px 0;
    transition: background 0.3s ease;
}

.stepIndicator__bar.is-active {
    background: #e58a8a;
}

/* ==========================================================================
   FORM STEP
   ========================================================================== */
.formStep {
    animation: fadeSlideIn 0.35s ease forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-4px);
    }
}

/* ==========================================================================
   FORM GROUP / LABEL / FIELD
   ========================================================================== */
.formGroup {
    margin-bottom: 24px;
}

.formGroup__desc {
    font-size: 13px;
    color: #999;
    margin: 0 0 12px;
}

.formLabel {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.formLabel__req {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #e58a8a;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* --- Input fields --- */
.formField input[type="text"],
.formField input[type="tel"],
.formField input[type="email"],
.formField input[type="date"],
.formField select,
.formField textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.formField input:focus,
.formField select:focus {
    outline: none;
    border-color: #e58a8a;
    box-shadow: 0 0 0 3px rgba(229, 138, 138, 0.12);
    background: #fff;
}

.formField input::placeholder {
    color: #c0c0c0;
}

.formField select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.formField__note {
    display: block;
    font-size: 12px;
    color: #e58a8a;
    margin-top: 6px;
    line-height: 1.5;
}

/* --- Age --- */
.formField--age {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.formField--age input[type="text"] {
    width: 80px;
    text-align: center;
}

.formField__unit {
    font-size: 14px;
    color: #666;
}

.formField__checkbox {
    width: 100%;
    margin-top: 6px;
}

.formField__checkbox .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
}

/* --- Radio (toggle style) --- */
.formField--radio .wpcf7-radio {
    display: flex;
    width: 100%;
}

.formField--radio .wpcf7-list-item {
    flex: 1;
    margin: 0;
}

.formField--radio .wpcf7-list-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.formField--radio .wpcf7-list-item:first-child label {
    border-radius: 8px 0 0 8px;
}

.formField--radio .wpcf7-list-item:last-child label {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.formField--radio .wpcf7-list-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.formField--radio .wpcf7-list-item label:has(input:checked) {
    background: #e58a8a;
    color: #fff;
    border-color: #e58a8a;
    font-weight: 600;
}

/* ==========================================================================
   CATEGORY SELECT - チェックボックス型
   ========================================================================== */
.categorySelect .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.categorySelect .wpcf7-list-item {
    margin: 0;
}

.categorySelect .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s ease;
}

.categorySelect .wpcf7-list-item:first-child label {
    border-top: 1px solid #eee;
}

.categorySelect .wpcf7-list-item label:hover {
    background: #fdf5f5;
}

/* チェックボックスを表示 */
.categorySelect .wpcf7-list-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e58a8a;
    flex-shrink: 0;
    cursor: pointer;
}

.categorySelect .wpcf7-list-item .wpcf7-list-item-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.categorySelect .wpcf7-list-item label:has(input:checked) .wpcf7-list-item-label {
    color: #e58a8a;
}

/* ==========================================================================
   SUB CATEGORY（小カテゴリ - ピル型タグ）
   親チェックボックスの直下にスライド表示
   ========================================================================== */
.subCategory {
    background: #fdf5f5;
    border-left: 3px solid #e58a8a;
    border-bottom: 1px solid #eee;
    padding: 14px 16px 14px 24px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.subCategory__title {
    font-size: 13px;
    font-weight: 600;
    color: #e58a8a;
    margin: 0 0 10px;
}

.subCategory__options .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.subCategory__options .wpcf7-list-item {
    margin: 0;
}

.subCategory__options .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0e7e7;
}

.subCategory__options .wpcf7-list-item:last-child label {
    border-bottom: none;
}

.subCategory__options .wpcf7-list-item label:hover {
    background: rgba(229, 138, 138, 0.06);
}

.subCategory__options .wpcf7-list-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e58a8a;
    flex-shrink: 0;
    cursor: pointer;
}

.subCategory__options .wpcf7-list-item label:has(input:checked) {
    color: #e58a8a;
    font-weight: 600;
}

/* ==========================================================================
   DATE ROW
   ========================================================================== */
.formField--date {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dateRow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dateRow__label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    min-width: 56px;
}

.dateRow__inputs {
    display: flex;
    gap: 8px;
    flex: 1;
}

.dateRow__inputs input[type="date"],
.dateRow__inputs select {
    flex: 1;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
}

/* 日付入力：カレンダーアイコンを右端に表示しつつ全域タップ可能に */
.dateRow__inputs input[type="date"] {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 40px;
}

/* ネイティブアイコンを透明にして全域クリック可能に */
.dateRow__inputs input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* iOS: date-time 内部要素の最小高さ確保 */
.dateRow__inputs input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.2em;
}

.dateRow__inputs input[type="date"]:focus,
.dateRow__inputs select:focus {
    outline: none;
    border-color: #e58a8a;
    box-shadow: 0 0 0 3px rgba(229, 138, 138, 0.12);
    background: #fff;
}

/* ==========================================================================
   NAVIGATION BUTTONS (span で実装)
   ========================================================================== */
.formStep__nav {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btnNext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: #e58a8a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.5px;
    user-select: none;
}

.btnNext:hover {
    background: #d47272;
}

.btnNext:active {
    transform: scale(0.97);
}

.btnNext::after {
    content: "→";
    font-size: 16px;
}

.btnPrev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: #999;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btnPrev:hover {
    border-color: #bbb;
    color: #666;
}

.btnPrev::before {
    content: "←";
    font-size: 14px;
}

/* --- Submit --- */
.formSubmit {
    text-align: center;
}

.formSubmit input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: linear-gradient(135deg, #e58a8a 0%, #f0a0a0 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(229, 138, 138, 0.3);
}

.formSubmit input[type="submit"]:hover {
    background: linear-gradient(135deg, #d47272 0%, #e58a8a 100%);
    box-shadow: 0 6px 20px rgba(229, 138, 138, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================================
   CF7 OVERRIDES
   ========================================================================== */
.mailForm--renewed .wpcf7-not-valid-tip {
    font-size: 12px;
    color: #e57373;
    margin-top: 4px;
}

.mailForm--renewed .wpcf7-response-output {
    border-radius: 8px;
    font-size: 14px;
    padding: 12px 16px;
    margin: 20px 0 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 480px) {
    .mailForm--renewed {
        padding: 16px 12px 32px;
    }

    .categorySelect .wpcf7-list-item label {
        padding: 12px 14px;
    }

    .categorySelect .wpcf7-list-item .wpcf7-list-item-label {
        font-size: 13px;
    }

    .subCategory {
        padding: 12px 12px 12px 20px;
    }

    .subCategory__options .wpcf7-list-item label {
        padding: 5px 10px;
        font-size: 12px;
    }

    .dateRow {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dateRow__inputs {
        flex-direction: column;
        width: 100%;
    }

    .dateRow__inputs input[type="date"],
    .dateRow__inputs select {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
    }

    .stepIndicator__label {
        font-size: 10px;
    }

    .stepIndicator__num {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .btnNext {
        width: 100%;
    }

    .formSubmit input[type="submit"] {
        width: 100%;
        padding: 16px 20px;
    }

    .formStep__nav--between {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .formStep__nav--between .btnPrev {
        width: 100%;
        justify-content: center;
    }
}