/************************************/
/** for the transform Demos */
.trdemo-box {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #f9f9f9;
}

.trdemo-controls {
    margin-top: 10px;
}

.trdemo-control-group {
    margin-bottom: 10px;
}

/* Matrix Demo Styles */
.matrix-grid {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #333;
    border-right: 4px solid #333;
    position: relative;
    /* slight curve to brackets */
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
/* visual brackets tips */
.matrix-grid::before, .matrix-grid::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 100%;
    top: 0;
    pointer-events: none;
    border-top: 4px solid #333;
    border-bottom: 4px solid #333;
}
.matrix-grid::before { 
    left: 0; 
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
.matrix-grid::after { 
    right: 0; 
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.matrix-cell input[type=range] {
    width: 100px;
    cursor: pointer;
}

/* Highlight for parametric demos */
.matrix-cell.active-highlight {
    background-color: #fff7e6; /* light orange/yellow */
    border-color: #fa8c16;
    transition: background-color 0.2s, border-color 0.2s;
    border-radius: 4px;
}
.matrix-cell.active-highlight input {
    background-color: #fff;
}

/* Smaller controls when width is constrained */
.matrix-controls.constrained-width .matrix-cell input[type=range] {
    width: 60px; /* restored to usable size */
}
.matrix-controls.constrained-width .matrix-grid {
    gap: 10px !important; /* more breathing room */
    padding: 10px;
}
.matrix-controls.constrained-width .matrix-cell div {
    font-size: 0.9em !important;
    margin-bottom: 2px !important;
}
