/**
 * Contact Form 7 カスタムスタイル
 * VTuber Postテーマ用
 */

/* フォーム全体のスタイル */
.contact-form-wrapper .wpcf7 {
    max-width: 100%;
}

/* フォームグループ */
.wpcf7 p {
    margin-bottom: 0;
}

.wpcf7 form p {
    margin-bottom: 0;
}

.wpcf7 .form-group {
    margin-bottom: 1.5rem;
}

/* 自動挿入されるbrタグを非表示 */
.wpcf7 form br {
    display: none;
}

/* ラベル */
.wpcf7 label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}

/* フォームコントロールラッパー */
.wpcf7 .wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

/* 必須マーク */
.wpcf7 .wpcf7-form-control-wrap .wpcf7-not-valid-tip {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* 入力フィールド共通 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    outline: none;
    border-color: #FF8B9B;
    box-shadow: 0 0 0 3px rgba(255, 139, 155, 0.1);
}

/* テキストエリア */
.wpcf7 textarea {
    min-height: 150px;
    resize: vertical;
}

/* チェックボックスとラジオボタン */
.wpcf7 .wpcf7-list-item {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.wpcf7 .wpcf7-list-item input[type="checkbox"],
.wpcf7 .wpcf7-list-item input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.wpcf7 .wpcf7-list-item-label {
    font-weight: 400;
}

/* 送信ボタン */
.wpcf7 input[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF8B9B 0%, #FFB8C2 100%);
    border: none;
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(255, 139, 155, 0.3);
}

.wpcf7 input[type="submit"]:hover {
    background: linear-gradient(135deg, #e57a8a 0%, #FF8B9B 100%);
    box-shadow: 0 10px 15px -3px rgba(255, 139, 155, 0.4);
    transform: translateY(-2px);
}

.wpcf7 input[type="submit"]:active {
    transform: translateY(0);
}

/* 送信中の状態 */
.wpcf7 .ajax-loader {
    display: inline-block;
    margin-left: 1rem;
    vertical-align: middle;
}

.wpcf7 form.submitting input[type="submit"] {
    opacity: 0.7;
    cursor: wait;
}

/* バリデーションエラー */
.wpcf7 .wpcf7-not-valid {
    border-color: #ef4444 !important;
}

.wpcf7 .wpcf7-not-valid-tip {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 送信完了・エラーメッセージ */
.wpcf7 .wpcf7-response-output {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.wpcf7 .wpcf7-mail-sent-ok {
    background-color: #dcfce7;
    border: 2px solid #86efac;
    color: #166534;
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-validation-errors,
.wpcf7 .wpcf7-spam-blocked {
    background-color: #fee2e2;
    border: 2px solid #fca5a5;
    color: #991b1b;
}

/* ファイルアップロード */
.wpcf7 input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #e2e8f0;
    border-radius: 0.5rem;
    background-color: #f8fafc;
}

.wpcf7 input[type="file"]:hover {
    border-color: #FF8B9B;
    background-color: #ffffff;
}

/* 同意チェックボックス */
.wpcf7 .wpcf7-acceptance {
    margin: 1.5rem 0;
}

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

.wpcf7 .wpcf7-acceptance .wpcf7-list-item label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 0.5rem 0 0;
    cursor: pointer;
    flex-shrink: 0;
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label {
    margin: 0;
    cursor: pointer;
    line-height: 1.5;
}

/* スピナー（送信中のアイコン） */
.wpcf7 .ajax-loader {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f4f6;
    border-top-color: #FF8B9B;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
    .wpcf7 input[type="submit"] {
        width: auto;
        min-width: 250px;
    }
}

/* reCAPTCHA */
.wpcf7 .wpcf7-form-control-wrap.recaptcha {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

/* プライバシーポリシーリンク */
.contact-form-wrapper .privacy-policy {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.contact-form-wrapper .privacy-policy a {
    color: #FF8B9B;
    text-decoration: underline;
}

.contact-form-wrapper .privacy-policy a:hover {
    color: #e57a8a;
}

/* フォーム説明文 */
.contact-form-description {
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background-color: #FDEFEF;
    border-left: 4px solid #FF8B9B;
    border-radius: 0.5rem;
}

.contact-form-description p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* エラーメッセージの位置調整 */
.wpcf7 .wpcf7-not-valid-tip {
    display: block;
    margin-top: 0.5rem;
}

/* 送信ボタンの配置 */
.wpcf7 .wpcf7-submit {
    margin-top: 1rem;
}

/* プライバシーポリシー（フォーム内） */
.wpcf7 .privacy-policy {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.wpcf7 .privacy-policy p {
    margin: 0;
    line-height: 1.6;
}

.wpcf7 .privacy-policy a {
    color: #FF8B9B;
    text-decoration: underline;
}

.wpcf7 .privacy-policy a:hover {
    color: #e57a8a;
}