/* Administrative Users Manager - Frontend CSS */

table > :not(caption) > * > * {
    border: 1px solid #7D7D7D !important;
}
body table {
    border-radius: 0 !important;
}
body table tr th {
    font-size: 16px;
    color: #ffffff !important;
    font-weight: 600;
    background-color: #3366FE !important;
    padding: 15px 14px !important;
    border-color: #ffffff;
    width: auto !important;
}
body table tr td {
    font-size: 16px;
    color: #333333;
    font-weight: 500;
    padding: 15px 14px !important;
}
body table tr td a {
    color: #333333;
}
body table tr td a:hover {
    color: #3366FE !important;
}
.admin-users-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}
/*body table tbody tr:nth-child(even) {
  background-color: $white;
}    
body table tbody tr:nth-child(odd) {
    background-color: #F4F4F4;
}*/
/* Main container */
#administrative-users-frontend {
    max-width: 100%;
    margin: 0 auto;
    padding: 58px 30px 0;
}

/* Filter controls - Updated to match image */
.admin-users-filters {
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: transparent !important;
    padding: 0px !important;
    border-radius: 0px !important;
    border: none !important;
}

.admin-users-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Keep search and filter buttons in a single line */
.admin-users-filters .filter-group:last-child {
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
}

.admin-users-filters .filter-group label {
    font-weight: bold;
    color: #333333;
    font-size: 14px;
    margin: 0;
    line-height: 1.2;
}

.admin-users-filters input,
.admin-users-filters select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    background: #ffffff;
    min-height: 44px;
    box-sizing: border-box;
}

.admin-users-filters input[type="text"] {
    min-width: 280px;
    padding: 12px 15px;
    border: 1px solid #7D7D7D !important;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* font-family: 'Noto Sans Devanagari', Arial, sans-serif; */
}

.admin-users-filters select {
    min-width: 200px;
    width: 200px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-size: 16px;
    background-position: right 12px center;
    background-repeat: no-repeat;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    border: 1px solid #7D7D7D !important;
}

.admin-users-filters input:focus,
.admin-users-filters select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Button styles to match image */
.admin-users-filters button[type="submit"] {
    background: #0073aa;
    color: white;
    cursor: pointer;
    border: 1px solid #0073aa;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    min-height: 44px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.admin-users-filters .clear-filters-btn {
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    min-height: 44px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* Button Styles */
.button {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid #333333 !important;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #333333 !important;
    color: #fff;
    margin-right: 10px;
    transition: all 0.3s ease;
    font-weight: 700;
    min-height: 45px;
    min-width: 145px;
    padding: 10px 10px;
}

.button:hover, .button:focus {
    transform: none !important;
    box-shadow: none !important;
    outline: none;
    background-color: transparent !important;
    border-color: #333333 !important;
    color: #333333;
    background: transparent;
    border: 2px solid #333333;
}

body .button.button-primary {
    background-color: #3366FE !important;
    border-color: #3366FE !important;
    color: #fff;
    background: transparent;
    border: 2px solid #3366FE;
}
div#ulb-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body .button.button-primary:hover, body .button.button-primary:focus {
    background-color: transparent !important;
    background:transparent !important;
    border-color: #3366FE !important;
    color: #3366FE !important;
}

/* Updated button hover states to match image */
.admin-users-filters button[type="submit"]:hover {
    background: #005a87;
    border-color: #005a87;
}

.admin-users-filters button[type="submit"]:active {
    background: #004a73;
    border-color: #004a73;
}

.admin-users-filters .clear-filters-btn:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.admin-users-filters .clear-filters-btn:active {
    background: #e9ecef;
    border-color: #005a87;
    color: #005a87;
}

/* Count display */
#admin-users-count {
    margin-bottom: 20px;
    font-size: 16px;
    color: #555;
}
#admin-users-count p {
    margin-bottom: 0 !important;
}
#admin-users-count strong {
    color: #0073aa;
    font-size: 18px;
    display: none;
}

/* User cards grid */
.admin-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Individual user card */
.admin-user-card {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: #0073aa;
}

.admin-user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #005a87);
}

.admin-user-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.admin-user-card p {
    margin: 12px 0;
    line-height: 1.6;
    color: #666;
    display: flex;
    align-items: flex-start;
}

.admin-user-card p strong {
    color: #333;
    font-weight: 600;
    min-width: 90px;
    margin-right: 10px;
}

.admin-user-card p span {
    flex: 1;
}

/* Icons for user info */
.admin-user-card p::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 2px;
    flex-shrink: 0;
}

/* .admin-user-card p:has(strong:contains("Designation"))::before { */
.admin-user-card p.has-designation::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C13.1 2 14 2.9 14 4C14 5.1 13.1 6 12 6C10.9 6 10 5.1 10 4C10 2.9 10.9 2 12 2ZM21 9V7L15 7V9C15 10.65 13.65 12 12 12C10.35 12 9 10.65 9 9V7L3 7V9C3 11.76 5.24 14 8 14H16C18.76 14 21 11.76 21 9Z'/%3E%3C/svg%3E");
}

/* .admin-user-card p:has(strong:contains("Extension"))::before { */
.admin-user-card p.has-extension::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'%3E%3Cpath d='M6.62,10.79C8.06,13.62 10.38,15.94 13.21,17.38L15.41,15.18C15.69,14.9 16.08,14.82 16.43,14.93C17.55,15.3 18.75,15.5 20,15.5A1,1 0 0,1 21,16.5V20A1,1 0 0,1 20,21A17,17 0 0,1 3,4A1,1 0 0,1 4,3H7.5A1,1 0 0,1 8.5,4C8.5,5.25 8.7,6.45 9.07,7.57C9.18,7.92 9.1,8.31 8.82,8.59L6.62,10.79Z'/%3E%3C/svg%3E");
}

/* Empty state */
.admin-users-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.admin-users-empty::before {
    content: '👥';
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
}

.admin-users-empty h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.admin-users-empty p {
    margin: 0;
    font-size: 14px;
}

/* Pagination - Updated to match image */
.admin-users-pagination {
    margin: 40px 0;
    text-align: center;
    padding: 25px 0;
    border-top: 2px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.admin-users-pagination {
    margin-top: 0 !important;
    text-align: center;
    padding: 20px 0;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin: 0;
    border: 1px solid #E8EAED;
    border-radius: 6px;
    text-decoration: none;
    color: #5F6368;
    background: #E8EAED;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    min-width: 40px;
    min-height: 36px;
}

.pagination-link:hover {
    background: #DADCE0;
    border-color: #DADCE0;
    color: #5F6368;
    text-decoration: none;
}

.pagination-link.current {
    background: #4285F4;
    color: #ffffff;
    border-color: #4285F4;
    font-weight: bold;
}

.pagination-link.prev,
.pagination-link.next {
    font-weight: 500;
}
body .admin-users-pagination .current {
    background: #3366FE !important;
    color: white;
    border-color: #3366FE !important;
    cursor: default;
    box-shadow: none !important;
}
body .admin-users-pagination a, body .admin-users-pagination span {
    display: flex;
    padding: 2.5px 0 !important;
    margin: 0 3px;
    text-decoration: none;
    border: 2px solid #E6E6E6;
    border-color: #E6E6E6 !important;
    background-color: #E6E6E6 !important;
    border-radius: 6px;
    color: #333333;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 33px !important;
    text-align: center;
    box-shadow: none !important;
}
body .admin-users-pagination .prev-page, body .admin-users-pagination .pagination-link.next {
    font-weight: 600;
    padding: 2.5px 10px !important;
    background: #3366FE !important;
    color: white !important;
    border-color: #3366FE !important;
    box-shadow: none !important;
}

/* Remove old pagination styles */
.page-btn {
    display: none;
}

/* Loading state */
.admin-users-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.admin-users-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3366FE !important;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search highlight */
.search-highlight {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Responsive design */
@media screen and (max-width: 1380px) {
    body table tr th, body table tr td {
        font-size: 14px !important;
    }
}
@media (max-width: 768px) {
    body .admin-users-table th, body .admin-users-table td {
        padding: 10px 14px !important;
    }
    body table tr th, body table tr td {
        padding: 10px 14px !important;
    }
    
    #administrative-users-frontend {
        padding: 20px 15px 0;
    }
    
    .admin-users-filters {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .admin-users-filters .filter-group {
        width: 100%;
    }
    
    .admin-users-filters input,
    .admin-users-filters select {
        width: 100%;
        min-width: unset;
    }
    
    /* Keep buttons in a single line on mobile */
    .admin-users-filters .filter-group:last-child {
        flex-direction: row;
        gap: 10px;
        justify-content: flex-start;
    }
    
    .admin-users-filters button[type="submit"],
    .admin-users-filters .clear-filters-btn {
        flex: 1;
        min-width: unset;
    }
    
    .admin-users-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .admin-user-card {
        padding: 20px;
    }
    
    .admin-user-card h3 {
        font-size: 18px;
    }
    
    .admin-user-card p {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-user-card p strong {
        min-width: unset;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    /* Mobile pagination */
    .admin-users-pagination {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .pagination-link {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 36px;
        min-height: 32px;
    }
}

@media (max-width: 480px) {    
    .admin-users-filters {
        padding: 10px;
        gap: 12px;
    }
    
    .admin-users-filters .filter-group label {
        font-size: 13px;
    }
    
    .admin-users-filters input,
    .admin-users-filters select {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .admin-users-filters button[type="submit"],
    .admin-users-filters .clear-filters-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .admin-user-card {
        padding: 15px;
    }
    
    .admin-user-card h3 {
        font-size: 16px;
    }
    
    #admin-users-count {
        font-size: 14px;
        text-align: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .admin-users-filters {
        background: #2c2c2c;
        border-color: #444;
    }
    
    .admin-users-filters input,
    .admin-users-filters select {
        background: #3c3c3c;
        border-color: #555;
        color: white;
    }
    
    .admin-user-card {
        background: #2c2c2c;
        border-color: #444;
        color: white;
    }
    
    .admin-user-card h3 {
        color: white;
        border-bottom-color: #444;
    }
    
    .admin-user-card p {
        color: #ccc;
    }
    
    .admin-user-card p strong {
        color: white;
    }
    
    .admin-users-empty {
        background: #2c2c2c;
        border-color: #444;
        color: #ccc;
    }
    
    .admin-users-empty h3 {
        color: white;
    }
    
    .page-btn {
        background: #3c3c3c;
        border-color: #555;
        color: white;
    }
    
    .page-btn:hover {
        background: #4c4c4c;
        border-color: #666;
    }
}

/* Print styles */
@media print {
    .admin-users-filters,
    .admin-users-pagination {
        display: none !important;
    }
    
    .admin-users-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .admin-user-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .admin-user-card:hover {
        transform: none;
    }
}

/* Highlight search terms */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}