/**
 * 梅若町会お問い合わせフォーム フロントエンドスタイル
 */

/* ラッパー全体 */
.umewaka-cf-wrapper {
    max-width: 720px;
    margin: 2em auto;
    padding: 2em 1.8em;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    color: #2c2c2c;
    font-size: 16px;
    line-height: 1.8;
    box-sizing: border-box;
}

.umewaka-cf-wrapper *,
.umewaka-cf-wrapper *::before,
.umewaka-cf-wrapper *::after {
    box-sizing: border-box;
}

/* タイトル */
.umewaka-cf-title {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 1.2em;
    padding-bottom: 0.6em;
    border-bottom: 2px solid #4a7a4a;
    color: #2c4a2c;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

/* メッセージ表示 */
.umewaka-cf-message {
    padding: 1.1em 1.3em;
    border-radius: 6px;
    margin-bottom: 1.8em;
    line-height: 1.8;
    font-size: 0.95em;
}

.umewaka-cf-message-success {
    background: #f1f8f1;
    border-left: 4px solid #4a7a4a;
    color: #2c4a2c;
}

.umewaka-cf-message-error {
    background: #fef0f0;
    border-left: 4px solid #c0392b;
    color: #922b21;
}

/* 必須マーク */
.umewaka-cf-required-note {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 1.5em;
    line-height: 1.6;
}

.umewaka-cf-required-mark {
    color: #c0392b;
    font-weight: bold;
    margin-left: 4px;
    font-size: 0.95em;
}

/* フィールド */
.umewaka-cf-field {
    margin-bottom: 1.5em;
}

.umewaka-cf-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.6em;
    color: #2c2c2c;
    font-size: 1em;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.umewaka-cf-field input[type="text"],
.umewaka-cf-field input[type="email"],
.umewaka-cf-field input[type="tel"],
.umewaka-cf-field select,
.umewaka-cf-field textarea {
    display: block;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 0.75em 0.9em;
    font-size: 16px; /* iOSの自動ズーム防止のため16px固定 */
    line-height: 1.6;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background-color: #fff;
    color: #2c2c2c;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    vertical-align: middle;
}

/* selectには右側の矢印用にスペース確保＋カスタム矢印 */
.umewaka-cf-field select {
    min-height: 48px;
    height: 48px;
    padding-top: 0;
    padding-bottom: 0;
    padding-right: 2.5em;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9em center;
    background-size: 12px 8px;
    cursor: pointer;
    line-height: 48px;
}

/* IE/Edgeでselectのデフォルト矢印を消す */
.umewaka-cf-field select::-ms-expand {
    display: none;
}

.umewaka-cf-field input:focus,
.umewaka-cf-field select:focus,
.umewaka-cf-field textarea:focus {
    border-color: #4a7a4a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 122, 74, 0.15);
}

.umewaka-cf-field textarea {
    resize: vertical;
    min-height: 160px;
    line-height: 1.7;
}

.umewaka-cf-field input::placeholder,
.umewaka-cf-field textarea::placeholder {
    color: #aaa;
}

.umewaka-cf-help {
    display: block;
    margin-top: 0.4em;
    color: #777;
    font-size: 0.85em;
    line-height: 1.5;
}

/* honeypot欄(画面外に隠す) */
.umewaka-cf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* プライバシーポリシー */
.umewaka-cf-privacy {
    background: #f9f9f9;
    padding: 1em 1.2em;
    border-radius: 4px;
    margin: 1.8em 0;
    font-size: 0.9em;
    line-height: 1.7;
    color: #555;
}

.umewaka-cf-privacy p {
    margin: 0;
}

/* 送信ボタン */
.umewaka-cf-submit {
    margin-top: 1.8em;
    text-align: center;
}

.umewaka-cf-button {
    display: inline-block;
    background: #4a7a4a;
    color: #fff !important;
    border: none;
    padding: 0.9em 2.5em;
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-width: 200px;
    min-height: 52px;
    height: auto;
    font-family: inherit;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    vertical-align: middle;
    white-space: nowrap;
}

.umewaka-cf-button:hover,
.umewaka-cf-button:focus {
    background: #3a6238;
    color: #fff !important;
}

.umewaka-cf-button:active {
    transform: translateY(1px);
}

.umewaka-cf-button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* レスポンシブ */
@media screen and (max-width: 600px) {
    .umewaka-cf-wrapper {
        padding: 1.3em 1em;
        margin: 1em auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .umewaka-cf-title {
        font-size: 1.3em;
    }

    .umewaka-cf-field {
        margin-bottom: 1.3em;
    }

    .umewaka-cf-button {
        width: 100%;
    }
}
