/* フロントエンド用スタイル */
.cfb-contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cfb-contact-form h3 {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 24px;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.cfb-field-wrapper {
    margin-bottom: 20px;
}

.cfb-field-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.cfb-field-wrapper .required {
    color: #d63638;
    margin-left: 3px;
}

.cfb-field-wrapper input,
.cfb-field-wrapper textarea,
.cfb-field-wrapper select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cfb-field-wrapper input:focus,
.cfb-field-wrapper textarea:focus,
.cfb-field-wrapper select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.cfb-field-wrapper input.cfb-error,
.cfb-field-wrapper textarea.cfb-error,
.cfb-field-wrapper select.cfb-error,
.cfb-field-wrapper input[type="checkbox"].cfb-error {
    border-color: #d63638;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.1);
}

.cfb-field-wrapper input[type="checkbox"].cfb-error + .cfb-checkbox-label {
    color: #d63638;
}

.cfb-checkbox-group input[type="checkbox"].cfb-error + .cfb-checkbox-label {
    color: #d63638;
    font-weight: bold;
}

.cfb-checkbox-group.cfb-error {
    border-color: #d63638;
    background: #fdf2f2;
}

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

/* チェックボックススタイル */
.cfb-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    margin-top: 8px;
}

.cfb-checkbox-wrapper:first-child {
    margin-top: 5px;
}

.cfb-checkbox-wrapper input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 2px;
    transform: scale(1.1);
    flex-shrink: 0;
}

.cfb-checkbox-wrapper .cfb-checkbox-label {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}

.cfb-checkbox-wrapper .cfb-checkbox-label:hover {
    color: #0073aa;
}

/* チェックボックスグループ */
.cfb-checkbox-group-label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.cfb-checkbox-group {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #fafafa;
}

.cfb-checkbox-group .cfb-checkbox-wrapper {
    margin-bottom: 10px;
}

.cfb-checkbox-group .cfb-checkbox-wrapper:last-child {
    margin-bottom: 0;
}

.cfb-submit-wrapper {
    text-align: center;
    margin-top: 30px;
}

.cfb-submit-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.cfb-submit-button:hover {
    background: #005a87;
}

.cfb-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cfb-messages {
    margin-top: 20px;
}

.cfb-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

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

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

.cfb-message.cfb-error ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.cfb-message.cfb-error li {
    margin-bottom: 5px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .cfb-contact-form {
        margin: 10px;
        padding: 15px;
    }
    
    .cfb-contact-form h3 {
        font-size: 20px;
    }
    
    .cfb-submit-button {
        width: 100%;
        padding: 15px;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .cfb-field-wrapper input,
    .cfb-field-wrapper textarea,
    .cfb-field-wrapper select,
    .cfb-submit-button {
        transition: none;
    }
}