/* 
 * React Components CSS for Cacao
 * Provides styling for React component integration
 */

/* Container for React components */
.react-component-container {
    position: relative;
    min-height: 50px;
    width: 100%;
    margin: 10px 0;
    border-radius: 4px;
    overflow: hidden;
}

/* Loading indicator for React components */
.react-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #6B4226;
    font-family: Arial, sans-serif;
    font-size: 14px;
    position: relative;
}

.react-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #6B4226;
    border-radius: 50%;
    border-top-color: transparent;
    animation: react-loading-spin 1s linear infinite;
}

@keyframes react-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error message for React components */
.react-component-container .error {
    padding: 15px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    border-left: 4px solid #c62828;
}

/* CodeMirror specific styles */
.react-component-container .CodeMirror {
    height: auto !important;
    min-height: 200px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Material UI specific styles */
.react-component-container .MuiButton-root {
    margin: 8px;
}

/* React JSON View specific styles */
.react-component-container .react-json-view {
    padding: 10px;
    border-radius: 4px;
    overflow: auto;
    max-height: 500px;
}