/* Custom Admin Panel Styles */

* {
    outline: none !important;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none !important;
}

/* Custom scrollbar for license keys */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
    height: 4px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 2px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.8);
}

/* Touch Target Improvements */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile Table Enhancements */
@media (max-width: 767px) {
    .mobile-table-compact {
        font-size: 0.75rem;
    }

    .mobile-table-compact td,
    .mobile-table-compact th {
        padding: 0.5rem 0.25rem;
    }

    .mobile-table-compact .px-4,
    .mobile-table-compact .px-5 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Horizontal Scroll Indicator */
.table-scroll-wrapper {
    position: relative;
    overflow-x: auto;
}

.table-scroll-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.table-scroll-wrapper.can-scroll::after {
    opacity: 1;
}

/* Mobile Modal Adjustments */
@media (max-width: 767px) {
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    /* Make modal full width on mobile */
    [id$="Modal"]>div {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
}

/* Mobile Button Stack */
@media (max-width: 640px) {
    .mobile-btn-stack {
        width: 100%;
    }

    .mobile-btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .mobile-btn-group>* {
        width: 100%;
    }
}

/* Improved touch feedback */
@media (hover: none) and (pointer: coarse) {

    button:active,
    a:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* Smooth scrolling on touch devices */
.-webkit-overflow-scrolling-touch {
    -webkit-overflow-scrolling: touch;
}

/* Horizontal scroll hint shadow */
.overflow-x-auto {
    position: relative;
}

.overflow-x-auto::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 1023px) {
    .overflow-x-auto:not(.scrolled-end)::after {
        opacity: 1;
    }
}