/* User Groups Component Styles */

/* Skeleton Loader Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.skeleton-loader.rounded-circle {
    border-radius: 50% !important;
}

/* Card styles */
.card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08) !important;
}

/* Table styles */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 1px solid #f0f0f0;
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    color: #6c757d;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.75em;
    border-radius: 50px;
    font-size: 0.75rem;
    line-height: 1.5;
}

/* Avatar styles */
.avatar-sm {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Icon box for modals */
.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Custom switch styles */
.form-switch .form-check-input {
    width: 2.5em;
    margin-left: -2.8em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%28(,255,255,255.25)'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: 2em;
    transition: background-position 0.15s ease-in-out;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Button styles */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Modal styles */
.modal-content {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

.modal-body {
    padding: 0 1.5rem 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 0.75rem;
        border: 1px solid #f0f0f0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #f0f0f0;
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
        color: #6c757d;
        text-transform: capitalize;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    /* Hide the ID in mobile view */
    .table tbody td small.text-muted {
        display: none;
    }
}
