/* Basic viewer setup */
#viewer {
    position: relative;
    height: 700px;
    width: 100%;
}

/* Control panels */
.display-controls, .pocket-controls {
    position: absolute;
    bottom: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    z-index: 100;
    max-width: calc(50% - 2rem);
}

.display-controls {
    left: 1rem;
}

.pocket-controls {
    right: 1rem;
}

/* Responsive panels */
@media (max-width: 768px) {
    .display-controls, .pocket-controls {
        max-width: calc(100% - 2rem);
    }
    
    .display-controls {
        bottom: calc(100% - 8rem);
    }
    
    .pocket-controls {
        bottom: 1rem;
    }
}

/* Panel headers */
.panel-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #4B5563;
    margin-bottom: 0.5rem;
}

/* Button container */
.button-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Viewer button styles */
.viewer-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    background-color: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.viewer-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.viewer-button:not(:disabled):hover {
    background-color: #F9FAFB;
}

.viewer-button:not(:disabled):active {
    background-color: #F3F4F6;
    transform: scale(0.98);
}

.viewer-button.active {
    color: #6D28D9;
    background-color: #F5F3FF;
    border-color: #DDD6FE;
}

.viewer-button.active:hover {
    background-color: #EDE9FE;
}

/* Change Surface button container */
.relative {
    position: relative;
}

/* Surface type buttons dropdown */
.surface-type-buttons {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.25rem);
    left: 50%;
    transform: translateX(-50%) scale(0.95) translateY(-0.5rem);
    min-width: 160px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.25rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.surface-type-buttons.show {
    opacity: 1 !important;
    transform: translateX(-50%) scale(1) translateY(0) !important;
    pointer-events: auto !important;
}

.surface-type-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    background-color: white !important;
    border: none;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.surface-type-button:hover {
    background-color: #F9FAFB !important;
}

.surface-type-button:active {
    background-color: #F3F4F6 !important;
}

.surface-type-button.active {
    color: #6D28D9;
    background-color: #F5F3FF !important;
}

.surface-type-button + .surface-type-button {
    margin-top: 0.25rem;
}

/* Screenshot buttons */
.screenshot-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4F46E5;
    background-color: white;
    border: 1px solid #E0E7FF;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.screenshot-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.screenshot-button:not(:disabled):hover {
    background-color: #F5F3FF;
}

.screenshot-button:not(:disabled):active {
    transform: scale(0.98);
}

/* Surface opacity control */
.opacity-slider-container {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    z-index: 100;
}

#surfaceOpacityLabel:not([disabled]) {
    color: #374151; /* text-gray-700 */
}

.opacity-slider {
    width: 8rem;
    height: 0.25rem;
    background: #E5E7EB;
    border-radius: 9999px;
    cursor: pointer;
    appearance: none;
}

.opacity-slider::-webkit-slider-thumb {
    appearance: none;
    width: 1rem;
    height: 1rem;
    background: #6D28D9;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.opacity-slider::-webkit-slider-thumb:hover {
    background: #5B21B6;
}

.opacity-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Keep existing table styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-color: #dee2e6;
}

/* Keep existing utility classes */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
}

.card-title {
    font-size: 1.25rem;
}

/* Sort indicators */
th.sort-asc .sort-indicator {
    opacity: 1 !important;
    transform: rotate(0deg);
}

th.sort-desc .sort-indicator {
    opacity: 1 !important;
    transform: rotate(180deg);
}

th.sort-asc .sort-indicator svg,
th.sort-desc .sort-indicator svg {
    @apply text-violet-600;
}

/* Hover effects for sortable headers */
th[data-column]:hover {
    @apply bg-violet-50;
}

th[data-column]:hover .sort-indicator {
    @apply opacity-100;
}
