/* Roles Section Styles */
/* Global body styles now in global.css */



/* Add Role button styles now in admin-sections-shared.css */

/* Table container and common table styles now in admin-sections-shared.css */

#roles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#roles-table th,
#roles-table td {
    text-align: left;
    vertical-align: top;
}

#roles-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

#roles-table tbody tr td {
    border-bottom: 1px solid #e9ecef;
}

/* Permissions badges */
.permissions-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.permission-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

/* Actions column */
.actions-cell {
    white-space: nowrap;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.action-btn.edit {
    color: #007bff;
}

.action-btn.edit:hover {
    background-color: #e7f3ff;
}

.action-btn.delete {
    color: #dc3545;
}

.action-btn.delete:hover {
    background-color: #fdeaea;
}

/* Modal Styles - using global modal styles from global.css */

.role-form {
    padding: 0 24px 24px 24px;
}


/* Permissions checkboxes */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: white;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.permission-checkbox:hover {
    background-color: #e3f2fd;
}

.permission-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.permission-checkbox label {
    margin: 0;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cancel-btn,
.submit-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 15px;
    }

    .table-container {
        margin-top: 15px;
    }

    #roles-table th,
    #roles-table td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

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

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 30px;
}

/* Error state */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.ReactModal__Content {
    background-color: transparent !important;
}




