/* company-admin-list.component.scss */

/* Admin grid layout - 7 COLUMNS: User ID, Name, Email, Contact, Role, Status, Details */
.admin-grid {
    // Default: All 7 columns visible on XL screens
    grid-template-columns: 140px 2fr 2fr 1.5fr 1.2fr 1fr 80px;
    
    // Ensure all items are vertically centered
    > div {
        display: flex;
        align-items: center;
    }

    @media (max-width: 1023px) { // lg breakpoint - hide Role and Status
        grid-template-columns: 140px 2fr 2fr 1.5fr 80px;
    }

    @media (max-width: 767px) { // md breakpoint - hide User ID
        grid-template-columns: 2fr 2fr 1.5fr 80px;
    }

    @media (max-width: 639px) { // sm breakpoint - hide Email
        grid-template-columns: 1fr 80px;
    }
}

/* Hover effect for rows */
.admin-grid:not(.sticky) {
    transition: background-color 0.2s ease;
    
    &:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }
}

/* Dark mode hover */
@media (prefers-color-scheme: dark) {
    .admin-grid:not(.sticky):hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Avatar styling */
.admin-grid img {
    transition: transform 0.2s ease;
}

.admin-grid:hover img {
    transform: scale(1.05);
}

/* Status badge animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Details panel animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-grid + .grid {
    animation: slideDown 0.3s ease-out;
}

/* Role badge colors */
.bg-orange-100 {
    background-color: #ffedd5;
}

.text-orange-800 {
    color: #9a3412;
}

.bg-amber-100 {
    background-color: #fef3c7;
}

.text-amber-800 {
    color: #92400e;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.text-red-800 {
    color: #991b1b;
}

/* Status badge colors */
.bg-green-100 {
    background-color: #dcfce7;
}

.text-green-800 {
    color: #166534;
}

.bg-green-400 {
    background-color: #4ade80;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.text-gray-800 {
    color: #1f2937;
}

.bg-gray-400 {
    background-color: #9ca3af;
}

/* Details panel card styling */
.bg-white {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Responsive text sizing */
@media (max-width: 639px) {
    .text-4xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

/* Loading state */
.pointer-events-none {
    pointer-events: none;
    opacity: 0.6;
}

/* Smooth transitions */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Icon sizing */
.icon-size-3 {
    height: 0.75rem;
    width: 0.75rem;
    font-size: 0.75rem;
}

.icon-size-4 {
    height: 1rem;
    width: 1rem;
    font-size: 1rem;
}

.icon-size-5 {
    height: 1.25rem;
    width: 1.25rem;
    font-size: 1.25rem;
}

/* Scrollbar styling */
.sm\:overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

.sm\:overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

.sm\:overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.sm\:overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Dark mode scrollbar */
@media (prefers-color-scheme: dark) {
    .sm\:overflow-y-auto::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .sm\:overflow-y-auto::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Print styles */
@media print {
    .admin-grid {
        grid-template-columns: 100px 1fr 1fr 120px 100px 80px;
        page-break-inside: avoid;
    }
    
    button, mat-paginator {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .admin-grid:hover {
        outline: 2px solid currentColor;
    }
    
    .bg-green-100,
    .bg-gray-100,
    .bg-orange-100,
    .bg-amber-100,
    .bg-red-100 {
        border: 1px solid currentColor;
    }
}