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

/* フォームコンテナ */
.sokubaikai-contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sokubaikai-contact-form-wrapper.alignwide {
    max-width: 1200px;
}

.sokubaikai-contact-form-wrapper.alignfull {
    max-width: 100%;
    border-radius: 0;
}

/* フォームヘッダー */
.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.form-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

/* フォームフィールド */
.form-fields {
    margin-bottom: 30px;
}

.form-field {
    margin-bottom: 25px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-field label .required {
    color: #e74c3c;
    margin-left: 3px;
}

/* 入力フィールド */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="password"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field input[type="tel"]:focus,
.form-field input[type="password"]:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* セレクトボックス */
.form-field select {
    background: #fff;
    cursor: pointer;
}

/* ラジオボタン・チェックボックス */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    background-color: #f8f9fa;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.radio-option label,
.checkbox-option label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

/* ファイルアップロード */
.form-field input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-field input[type="file"]:hover {
    border-color: #0073aa;
}

.file-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.file-preview {
    margin-top: 10px;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

/* 送信ボタン */
.form-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.submit-button {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
}

.submit-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-loading {
    display: none;
}

.submit-button:disabled .button-text {
    display: none;
}

.submit-button:disabled .button-loading {
    display: inline;
}

/* メッセージ */
.success-message,
.error-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.field-error {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .sokubaikai-contact-form-wrapper {
        padding: 15px;
        margin: 10px;
    }
    
    .form-header h3 {
        font-size: 20px;
    }
    
    .form-field input[type="text"],
    .form-field input[type="email"],
    .form-field input[type="tel"],
    .form-field input[type="password"],
    .form-field select,
    .form-field textarea {
        font-size: 16px; /* iOS ズーム防止 */
    }
    
    .submit-button {
        width: 100%;
        padding: 18px;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .sokubaikai-contact-form-wrapper {
        padding: 10px;
        margin: 5px;
    }
    
    .form-header {
        margin-bottom: 20px;
    }
    
    .form-field {
        margin-bottom: 20px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sokubaikai-contact-form-wrapper {
    animation: fadeIn 0.5s ease-out;
}

/* アクセシビリティ */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.submit-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .form-field input[type="text"],
    .form-field input[type="email"],
    .form-field input[type="tel"],
    .form-field input[type="password"],
    .form-field select,
    .form-field textarea {
        border-width: 3px;
    }
    
    .submit-button {
        border: 2px solid #000;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .sokubaikai-contact-form-wrapper {
        background: #1a1a1a;
        color: #fff;
    }
    
    .form-header h3 {
        color: #fff;
    }
    
    .form-field label {
        color: #fff;
    }
    
    .form-field input[type="text"],
    .form-field input[type="email"],
    .form-field input[type="tel"],
    .form-field input[type="password"],
    .form-field select,
    .form-field textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .form-field input[type="text"]:focus,
    .form-field input[type="email"]:focus,
    .form-field input[type="tel"]:focus,
    .form-field input[type="password"]:focus,
    .form-field select:focus,
    .form-field textarea:focus {
        border-color: #0073aa;
    }
    
    .radio-option:hover,
    .checkbox-option:hover {
        background-color: #333;
    }
    
    .file-info {
        color: #aaa;
    }
    
    .form-actions {
        border-top-color: #444;
    }
}
