/**
 * Forms Override CSS
 * チェックボックスのスタイル調整
 */

/* チェックボックスの表示を確実にする */
#custom-contact-form input[type="checkbox"] {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
    width: 20px;
    height: 20px;
    opacity: 1;
    visibility: visible;
    position: relative;
    display: inline-block;
    margin: 0 8px 0 0;
    vertical-align: middle;
    cursor: pointer;
    /* カスタムスタイル */
    border: 1px solid #d1d5db;
    background-color: #fff;
    border-radius: 4px;
}

/* チェックボックスのラベル調整 */
.form-checkbox {
    margin-bottom: 2rem;
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.checkbox-text {
    flex: 1;
    line-height: 1.5;
    padding-top: 2px;
}

/* チェックボックスのホバー効果 */
.checkbox-label:hover input[type="checkbox"] {
    border-color: #00867b;
}

/* チェックボックスのフォーカス効果 */
.checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid #00867b;
    outline-offset: 2px;
}

/* チェックボックスのチェック状態 */
.checkbox-label input[type="checkbox"]:checked {
    background-color: #00867b;
    border-color: #00867b;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* エラー状態のチェックボックス */
#custom-contact-form .error-message ~ input[type="checkbox"] {
    border-color: #ef4444;
}

/* モバイル対応 */
@media (max-width: 768px) {
    #custom-contact-form input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
}