/* CSS for Teeth Matrix Table */
.teeth-matrix-wrapper {
    margin: 20px 0;
    padding: 15px;
    background-color: #f7f7f7;
    border-radius: 5px;
    max-width: 100%;
    overflow-x: auto;
}

.teeth-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
	overflow: scroll;
}

.teeth-matrix-table th,
.teeth-matrix-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    min-width: 50px;
	width: 90px;
}

.teeth-matrix-table th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
}


.teeth-matrix-table .shade-row {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
}

.teeth-matrix-table .shade-label {
    background-color: #e6e6e6;
    font-weight: bold;
}

.teeth-matrix-table .size-column {
    min-width: 80px;
}


.teeth-matrix-table .size-row {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
}

.teeth-matrix-table .size-label {
    background-color: #e6e6e6;
    font-weight: bold;
}

.teeth-matrix-table .shade-column {
    min-width: 80px;
}

.teeth-matrix-table .quantity-cell {
    background-color: #fff;
    min-width: 80px;
}

.teeth-qty-input {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.not-available {
    color: #aaa;
    font-style: italic;
}

.teeth-matrix-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Make sure actions stay at the bottom of the container */
    margin-top: 10px;
}

.teeth-loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #333;
    animation: spin 1s ease-in-out infinite;
}

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

.teeth-message {
    padding: 5px 10px;
    border-radius: 3px;
}

.teeth-message.success {
    background-color: #dff0d8;
    color: #3c763d;
}

.teeth-message.error {
    background-color: #f2dede;
    color: #a94442;
}


.teeth-matrix-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
    .teeth-matrix-wrapper {
        padding: 10px;
    }
    
    .teeth-matrix-table th,
    .teeth-matrix-table td {
        padding: 6px;
    }
    
    .teeth-qty-input {
        width: 40px;
        padding: 3px;
    }
}