/* ========================================
   エントリーページ（応募フォーム）のスタイル
   ======================================== */

/* フォーム項目の順序変更用 */
/* お名前 */
input[name="お名前"],
input[name="お名前"] ~ label,
.mwform_item:has(input[name="お名前"]) {
    order: 1;
}

/* 電話番号 */
input[name="電話番号"],
input[name="電話番号"] ~ label,
.mwform_item:has(input[name="電話番号"]) {
    order: 2;
}

/* 希望施設 */
select[name="希望施設"],
select[name="希望施設"] ~ label,
.mwform_item:has(select[name="希望施設"]) {
    order: 3;
}

/* 希望職種 */
select[name="希望職種"],
select[name="希望職種"] ~ label,
input[name="希望職種"],
.mwform_item:has(input[name="希望職種"]),
.mwform_item:has(select[name="希望職種"]) {
    order: 4;
}

/* その他の項目 */
.mwform_item:not(:has(input[name="お名前"]))
:not(:has(input[name="電話番号"]))
:not(:has(select[name="希望施設"]))
:not(:has(input[name="希望職種"]))
:not(:has(select[name="希望職種"])) {
    order: 5;
}

/* フォーム全体をflexレイアウトに設定 */
.mwform {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* フォーム項目のスタイル */
.mwform_item {
    display: flex;
    flex-direction: column;
}

.mwform_item label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

/* 希望施設と希望職種のラベルを変更 */
select[name="希望施設"] ~ label::after,
input[name="希望施設"] ~ label::after {
    content: "（任意）";
    color: #999;
    font-weight: normal;
    font-size: 0.9em;
    margin-left: 0.3em;
}

select[name="希望職種"] ~ label::after,
input[name="希望職種"] ~ label::after {
    content: "（任意）";
    color: #999;
    font-weight: normal;
    font-size: 0.9em;
    margin-left: 0.3em;
}

/* 送信ボタンのスタイル変更 */
.mwform_submit,
input[type="submit"].mwform_submit,
button[type="submit"].mwform_submit,
.mwform button[type="submit"] {
    background: linear-gradient(135deg, #ff5f6d 0%, #ff3d47 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 15px 40px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    box-shadow: 0 4px 15px rgba(255, 61, 71, 0.4) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    cursor: pointer !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 200px !important;
}

.mwform_submit:hover,
input[type="submit"].mwform_submit:hover,
button[type="submit"].mwform_submit:hover,
.mwform button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(255, 61, 71, 0.6) !important;
}

.mwform_submit:active,
input[type="submit"].mwform_submit:active,
button[type="submit"].mwform_submit:active,
.mwform button[type="submit"]:active {
    transform: translateY(0) !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .mwform {
        gap: 1rem;
    }

    .mwform_submit,
    input[type="submit"].mwform_submit,
    button[type="submit"].mwform_submit,
    .mwform button[type="submit"] {
        padding: 12px 30px !important;
        font-size: 15px !important;
        min-width: 150px !important;
    }
}

@media (max-width: 480px) {
    .mwform_submit,
    input[type="submit"].mwform_submit,
    button[type="submit"].mwform_submit,
    .mwform button[type="submit"] {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}
