/* ==========================================
   お問い合わせフォーム（Contact Form 7カスタマイズ）
   ========================================== */

/* フォームセクション */
.contact-form-section {
    margin: 40px 0;
}

/* 区切り線 */
.contact-divider {
    text-align: center;
    margin: 50px 0;
    position: relative;
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.contact-divider::before {
    left: 0;
}

.contact-divider::after {
    right: 0;
}

.contact-divider span {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-bg);
    color: var(--color-text-light);
    font-weight: 700;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
}

/* フォーム全体のコンテナ */
.wpcf7 {
    max-width: 800px;
    margin: 0 auto;
}

/* フォームラッパー */
.contact-form-wrapper {
    background: var(--color-bg);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* フォーム項目 */
.form-group {
    margin-bottom: 30px;
}

/* ラベル */
.form-group label {
    display: block;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.form-group label .required {
    color: #ff6b6b;
    margin-left: 5px;
    font-weight: 900;
}

/* 入力フィールド共通 */
.wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

.wpcf7-text,
.wpcf7-email,
.wpcf7-tel,
.wpcf7-textarea,
.wpcf7-select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 1rem;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wpcf7-text:focus,
.wpcf7-email:focus,
.wpcf7-tel:focus,
.wpcf7-textarea:focus,
.wpcf7-select:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(26, 26, 46, 1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

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

/* プレースホルダー */
.wpcf7-text::placeholder,
.wpcf7-email::placeholder,
.wpcf7-tel::placeholder,
.wpcf7-textarea::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

/* 送信ボタン */
.wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #ffed4e 100%);
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 900;
    border: 3px solid var(--color-accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.wpcf7-submit::before {
    content: '✉️';
    font-size: 1.2rem;
}

.wpcf7-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #ffed4e 0%, var(--color-accent) 100%);
}

.wpcf7-submit:active {
    transform: translateY(-1px);
}

/* 送信ボタンの光エフェクト */
.wpcf7-submit::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* バリデーションエラー */
.wpcf7-not-valid-tip {
    display: block;
    margin-top: 8px;
    color: #ff6b6b;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
    border-radius: 4px;
}

.wpcf7-form-control.wpcf7-not-valid {
    border-color: #ff6b6b;
}

/* 送信成功メッセージ */
.wpcf7-response-output {
    margin: 30px 0 0;
    padding: 20px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
}

.wpcf7-mail-sent-ok {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
    color: #4caf50;
}

.wpcf7-mail-sent-ok::before {
    content: '✓ ';
    font-size: 1.5rem;
    margin-right: 10px;
}

/* 送信エラーメッセージ */
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
}

.wpcf7-validation-errors::before,
.wpcf7-mail-sent-ng::before {
    content: '⚠️ ';
    font-size: 1.5rem;
    margin-right: 10px;
}

/* スパム対策メッセージ */
.wpcf7-spam-blocked {
    background: rgba(255, 152, 0, 0.2);
    border: 2px solid #ff9800;
    color: #ff9800;
}

/* 送信中のスピナー */
.wpcf7-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* チェックボックス・ラジオボタン */
.wpcf7-list-item {
    margin: 10px 0;
}

.wpcf7-list-item-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--color-text);
    font-weight: 500;
}

.wpcf7-checkbox input[type="checkbox"],
.wpcf7-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-accent);
}

/* 同意チェックボックス */
.wpcf7-acceptance .wpcf7-list-item-label {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* プライバシーポリシーリンク */
.privacy-policy-link {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 600;
}

.privacy-policy-link:hover {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 25px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .wpcf7-text,
    .wpcf7-email,
    .wpcf7-tel,
    .wpcf7-textarea,
    .wpcf7-select {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .wpcf7-submit {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

/* フォーム送信時のフェードイン */
.wpcf7-response-output {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RPG風の装飾 */
.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent 25%, 
        rgba(255, 215, 0, 0.1) 25%, 
        rgba(255, 215, 0, 0.1) 50%, 
        transparent 50%, 
        transparent 75%, 
        rgba(255, 215, 0, 0.1) 75%
    );
    background-size: 20px 20px;
    border-radius: 12px;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}
