/**
 * プライバシーポリシー同意欄のレイアウト修正
 */

/* チェックボックスグループの修正 - 高い優先度 */
.contact-form .checkbox-group,
.contact-form-wrapper .checkbox-group,
.form-group.checkbox-group,
.checkbox-group {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    margin: 20px 0;
}

.contact-form .checkbox-label,
.checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    cursor: pointer;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #667eea;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\2713';
    color: white;
    font-weight: bold;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* テキスト部分のスタイル */
.checkbox-label > span:last-child {
    font-size: 14px;
    color: #333;
    display: inline-block;
    line-height: 1.6;
    padding-top: 1px;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.checkbox-label a:hover {
    color: #5a6fd8;
}

.checkbox-label .required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .checkbox-group {
        padding: 15px;
        margin: 15px 0;
    }
    
    .checkbox-label {
        gap: 10px;
    }
    
    .checkbox-label > span:last-child {
        font-size: 13px;
    }
    
    .checkmark {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
    }
}

/* より良い配置のための調整 */
.form-group.checkbox-group {
    margin-top: 30px;
    margin-bottom: 30px;
}

/* フォーカス時のスタイル */
.checkbox-label:hover .checkmark {
    border-color: #5a6fd8;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* チェックボックスが必須の場合の視覚的フィードバック */
.checkbox-label input[type="checkbox"]:invalid + .checkmark {
    border-color: #999;
}

.checkbox-label input[type="checkbox"]:valid:checked + .checkmark {
    animation: checkAnimation 0.3s ease;
}

@keyframes checkAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}