/* CB-AICF7 フロントエンドスタイル */

.cb-aicf7-response {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cb-aicf7-refresh-btn {
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    margin: 10px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s ease;
    text-transform: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    line-height: 1.4 !important;
}

.cb-aicf7-refresh-btn:hover {
    background: #005a87 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cb-aicf7-refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.cb-aicf7-content {
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    line-height: 1.6;
}

.cb-aicf7-content p {
    margin: 0 0 10px 0;
}

.cb-aicf7-content p:last-child {
    margin-bottom: 0;
}

.cb-aicf7-loading {
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    border-top: 1px solid #ffeaa7;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cb-aicf7-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: cb-aicf7-loading 2s infinite;
}

@keyframes cb-aicf7-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cb-aicf7-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-top: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
}

.cb-aicf7-empty {
    padding: 15px;
    background: #e2e3e5;
    color: #383d41;
    border-top: 1px solid #d6d8db;
    text-align: center;
    font-style: italic;
}

.cb-aicf7-updated {
    animation: cb-aicf7-highlight 1s ease-in-out;
}

@keyframes cb-aicf7-highlight {
    0% { 
        background-color: #d4edda;
        transform: scale(1.02);
    }
    50% {
        background-color: #d4edda;
    }
    100% { 
        background-color: transparent;
        transform: scale(1);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .cb-aicf7-response {
        margin: 10px 0;
    }
    
    .cb-aicf7-refresh-btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    
    .cb-aicf7-content,
    .cb-aicf7-loading,
    .cb-aicf7-error,
    .cb-aicf7-empty {
        padding: 12px;
        font-size: 14px;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .cb-aicf7-response {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .cb-aicf7-content {
        background: #333;
        color: #e0e0e0;
        border-top-color: #444;
    }
    
    .cb-aicf7-loading {
        background: #4a4a2a;
        color: #d4af37;
        border-top-color: #5a5a3a;
    }
    
    .cb-aicf7-error {
        background: #4a2d2d;
        color: #ff6b6b;
        border-top-color: #5a3d3d;
        border-left-color: #ff4757;
    }
    
    .cb-aicf7-empty {
        background: #3a3a3a;
        color: #aaa;
        border-top-color: #444;
    }
}

/* アクセシビリティ改善 */
.cb-aicf7-refresh-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* 印刷時の調整 */
@media print {
    .cb-aicf7-refresh-btn {
        display: none !important;
    }
    
    .cb-aicf7-loading {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
    
    .cb-aicf7-response {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}