/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: center;
}

/* Column width optimization */
th:nth-child(1), /* Company Name */
td:nth-child(1) {
    width: auto;
    text-align: left;
    min-width: 200px;
}

th:nth-child(2), /* Location */
td:nth-child(2) {
    width: auto;
    text-align: left;
    min-width: 120px;
}

td:nth-child(4),
td:nth-child(5) {
    text-align: right;
}

th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    vertical-align: bottom;
    min-height: 60px;
}

th:hover {
    background-color: #e9ecef;
}

.sort-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 24px;
    margin-bottom: 4px;
}

.sort-indicator {
    margin-left: 5px;
    opacity: 0.5;
    min-width: 12px;
    text-align: center;
}

.sort-indicator.active {
    opacity: 1;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

tr.selected {
    background-color: #e3f2fd;
}

/* Links Column */
.links-column {
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.link-icon {
    display: inline-block;
    margin: 0 2px;
    width: 18px;
    height: 18px;
    text-decoration: none;
    vertical-align: middle;
}

.link-icon svg {
    width: 100%;
    height: 100%;
    fill: #007bff;
    transition: opacity 0.2s;
}

.link-icon.disabled svg {
    fill: #ccc;
}

.link-icon:not(.disabled):hover svg {
    fill: #0056b3;
}

.link-icon.disabled {
    cursor: not-allowed;
}

.link-icon.error svg {
    fill: #dc3545;
}

.link-icon.error:not(.disabled):hover svg {
    fill: #c82333;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: white;
    position: relative;
    z-index: 10;
}

.pagination-info {
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.pagination-button:hover:not(:disabled) {
    background: #0056b3;
}

.pagination-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-size-selector select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.current-page-input {
    width: 50px;
    text-align: center;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Tech Status Columns */
td:nth-child(5), /* Website Tech */
td:nth-child(6) /* Shop Tech */ {
    text-align: center;
    vertical-align: middle;
    padding: 8px;
}

/* Lighthouse Score Columns */
td:nth-child(7), /* Website Performance */
td:nth-child(8), /* Website Accessibility */
td:nth-child(9), /* Website Best Practices */
td:nth-child(10), /* Website SEO */
td:nth-child(11), /* Shop Performance */
td:nth-child(12), /* Shop Accessibility */
td:nth-child(13), /* Shop Best Practices */
td:nth-child(14) /* Shop SEO */ {
    text-align: center;
    vertical-align: middle;
    padding: 8px;
}

/* Center circular scores in table cells */
td .circular-score {
    margin: 0 auto;
}


.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.action-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn.loading {
    animation: pulse 1.5s infinite;
}

.scrape-btn:hover:not(:disabled) {
    background: #e3f2fd;
    border-color: #2196F3;
}

.tech-btn:hover:not(:disabled) {
    background: #f3e5f5;
    border-color: #9c27b0;
}

.full-scan-btn:hover:not(:disabled) {
    background: #e8f5e8;
    border-color: #4caf50;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Notification styles */
.notification {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}
