/* Custom Grid Styling to mimic Excel */

table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
}

th, td {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 4px;
    height: 24px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

/* Headers */
th {
    background-color: #f3f4f6;
    color: #4b5563;
    font-weight: 600;
    text-align: center;
    position: sticky;
    z-index: 1;
    user-select: none;
}

/* Top Header Row */
thead tr:first-child th {
    top: 0;
    z-index: 2;
    border-bottom: 1px solid #d1d5db;
}

/* Row Number Column */
tbody th {
    left: 0;
    z-index: 2;
    border-right: 1px solid #d1d5db;
    min-width: 40px;
}

/* Cells */
td {
    background-color: #fff;
    cursor: cell;
    outline: none;
}

td.selected {
    border: 2px solid #16a34a; /* Tailwind Green-600 */
    z-index: 3;
}

td.highlighted-ref {
    background-color: rgba(22, 163, 74, 0.1);
    border: 1px dashed #16a34a;
}

/* Resizing inputs in wizard */
input:focus, select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 1px #16a34a;
}

/* Tab styling */
.sheet-tab {
    padding: 6px 12px;
    border-radius: 4px 4px 0 0;
    background-color: #e5e7eb;
    color: #4b5563;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.sheet-tab.active {
    background-color: #fff;
    color: #16a34a;
    font-weight: bold;
    border-top: 2px solid #16a34a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
